Commit Graph

45 Commits

Author SHA1 Message Date
e3597b6548 Add Datum.IsNull() fucntion (#1298)
Add IsNull function for Datum to simplify null check.
2016-06-07 23:35:25 +08:00
10359b0052 rewrite executor. (#1294)
* rewrite executor.
2016-06-07 20:32:15 +08:00
d9569a6801 *: Support date_format (#1295)
* *: support date_format

* evaluator: update yearweek function
2016-06-06 18:49:06 +08:00
0373895334 *: Support time (#1282)
* *: support time
2016-06-02 10:48:09 +08:00
75f089d056 util/types: clean up, removed unused code. (#1281) 2016-06-02 10:42:36 +08:00
61532d7c4e *: Support monthname (#1279)
* *: support monthname
2016-06-01 14:02:53 +08:00
f9c31d9130 Hanfei/rewrite plan (#1272) 2016-06-01 13:12:55 +08:00
f09574d826 *: support sql mode (#1263) 2016-05-30 13:16:41 +08:00
86fe54dadc *: Fix issue 1118 (#1259)
* *: fix issue 1118
2016-05-26 12:49:43 +08:00
228f1d7026 support hash join in new plan (#1234)
* support hash join.

* fix some errors

* add test for predicate push down

* change substitutor...

* add bench mark

* change comment

* fix bug.
2016-05-19 15:43:16 +08:00
55ed68ca6c add builtin-reverse func (#1224) 2016-05-13 20:53:55 +08:00
2e355f3749 *: Fix issue#1114 (#1231)
* *: supprot assignment

* *: fix issue 1114
2016-05-13 11:26:26 +08:00
0841dbef9b *: Support builtin function round(X), round(X, D) (#1208)
Support builtin function round(X), round(X, D)
2016-05-07 13:38:02 +08:00
887f819a41 *: Support Mod(N, M) (#1194)
*: Support Mod(N, M)

Fix: https://github.com/pingcap/tidb/issues/1193
2016-05-04 10:26:22 +08:00
3671f3958f xapi: support IN expression push down. (#1147)
* xapi: support IN expression push down.
2016-04-25 19:50:33 +08:00
4ced2f7e10 *: implement some other builtin functions (#1137)
Support ISNULL(), LTRIM(), RTRIM(), LCASE() and UCASE().
Add alias for LOWER() and UPPER().
2016-04-23 21:04:26 +08:00
3b25069f84 evaluator: avoid evaluate independent subquery multiple times. (#1144)
* evaluator: avoid evaluate independent subquery multiple times.

* ast: rename UseOuterContext to Correlated.
2016-04-22 12:51:18 +08:00
d78e4044cc *: fix misspells (#1143) 2016-04-22 11:30:37 +08:00
041dfd97c1 executor: evaluate subquery before executing outer query. (#1133)
* executor: evaluate subquery before executing outer query.

So outer query can push down subquery values.

* evaluator: extract a function to evaluate subquery.

* evaluator: add comments on exported function.
2016-04-21 21:51:39 +08:00
c26dfd54e4 executor: Change interface to datum in executor. (#1103)
Change interface to datum in executor.
2016-04-20 09:52:23 +08:00
cd3d424252 evaluator: partially fix issue #1098 (#1100)
Fix the incorrect behavior of `substring` function, multi-byte charset still hasn't been supported.
2016-04-17 00:43:30 +08:00
8c164bc078 evaluator,parser: support ASCII(). (#309) (#1083)
* evaluator: add a builtin function wanted by #310.

* parser: update parser for ASCII().
2016-04-14 01:53:50 -05:00
bebacf4f3a evaluator: just one time eval (#1062)
* evaluator: just one time eval
2016-04-12 12:34:27 +08:00
08034540f0 *: Add leak test
* *: add leak test and tiny clean up

* *: unify test format and add leak test

Conflicts:
	store/localstore/compactor_test.go
	mysql/error_test.go
*: add leak test
2016-04-07 20:53:45 +08:00
d01d516105 evaluator, parser: support UTC_DATE()
* evaluator, parser: support UTC_DATE()

Fix issue: #236.
2016-04-05 21:25:04 +08:00
86f4459543 util: Reserve mysql.Time change. 2016-03-31 18:49:17 +08:00
afdf9a4ef6 Change mysql.Time to ptr in datum.
In this way, we can save the cost of the alloc of mysql.Time in interface.
In the future, we will change all mysql.Time to ptr to save the cost of copy mysql.Time struct.
2016-03-29 18:42:16 +08:00
49471419a8 evaluator: fix a bug in checkInList.
Fix a bug in checkInList.
2016-03-25 14:38:17 +08:00
419f244031 evaluator: change interface to datum in evaluator package.
Change the remaining string functions.
2016-03-25 12:01:58 +08:00
5fd28ea1b2 *: Fix go vet shadow 2016-03-23 10:32:29 +08:00
2ef0c56ccc Make some change. 2016-03-22 16:12:07 +08:00
abeea90449 evaluator: change the remaining string functions.
Change the remaining string functions.
2016-03-22 14:04:23 +08:00
1ba2f08a71 evaluator: change concat_ws, left, length, lower, repeat, upper.
Change the interfaces of concat_ws, left, length, lower, repeat, upper to datums.
2016-03-21 20:09:54 +08:00
c960c81d86 evaluator: Change the interfaces of builtinConcat to datums.
Change the interfaces of builtinConcat to datums.
2016-03-21 16:31:03 +08:00
ac76b071b3 evalutator: change the shadowed err
Change the shadowed err to err1.
2016-03-16 15:58:30 +08:00
47cb1d6626 evaluator: change math and time parma interface to datum
Change math and time parma interface to datum.
2016-03-16 13:03:54 +08:00
0fa8df585a evaluator: change SetDatum and implement ToBool, ToInt
Change SetDatum and implement ToBool, ToInt.
2016-03-11 19:58:40 +08:00
5a81a2f5d4 evaluator: change Get/SetValue to Get/SetDatum.
Chnage Get/SetValue to Get/SetDatum in evaluator.go .
2016-03-11 13:37:58 +08:00
352c27829a evaluator: move date_add and date_sub to buildin
Move the evaluate of ast function date_add and date_sub to builtin.
2016-03-10 19:04:33 +08:00
79962174ef evaluator: move the files in buildin package to evaluator package
Move the files in buildin package to evaluator package.
2016-03-10 10:03:47 +08:00
f4bf763d27 evaluator: move the evaluate of ast function trim to buildin
Move the evaluate of ast function trim to builtin.
2016-03-09 18:06:16 +08:00
02ccdc363a evaluator: move the evaluate of ast function substring_index and locate to buildin
Move the evaluate of ast function substring_index and locate to buildin.
And Change some logic in locate function to make its behavior more similar with MySQL.
2016-03-08 17:30:43 +08:00
afd369e042 evaluator: move the evaluate of ast functions to buildin
Move the evaluate of ast functions extract, convert and substring to buildin.
2016-03-08 10:50:14 +08:00
a9d0039573 *: Add Coerce before compare for PatternInExpr
Fix sqllogic test
2016-03-07 14:34:55 +08:00
043ebd5ec8 *: Refactor package organization
1. Move evaluator from optimizer to root dir.
2. Move builtin from expression to evaluator.
3. Remove expression package.
2016-03-02 13:48:22 +08:00