Commit Graph

1204 Commits

Author SHA1 Message Date
e488bcc23d expression: some builtin functions can be folded (#4756)
* expression: unix_timestamp, utc_timestamp can be folded

* add mores exprs

* add non-cacheable functions
2017-10-12 01:18:26 -05:00
51a6e6fc48 *: fix ineffectual assignments #4713 (#4746) 2017-10-11 21:26:03 -05:00
83ace4f748 expression: return NULL when error is not nil (#4749) 2017-10-11 03:38:03 -05:00
7d2804e43c *: check sc.IgnoreZeroInDate when parsing string or number to date/datetime/timestamp (#4732) 2017-10-10 23:38:53 -05:00
3e1d036336 *: log the caller of "terror.Log()" (#4729) 2017-10-10 11:26:43 +08:00
e11c4fbaad expression, plan: improve fold constant (#4721)
* improve fold constant

* remove useless code

* remove useless argument

* address comment
2017-10-09 17:43:13 +08:00
9c2ea17722 *: enforce errcheck in Makefile (#4724)
checks all errors and enable errcheck in Makefile

Fixes https://github.com/pingcap/tidb/issues/4668
2017-10-09 17:16:10 +08:00
17b3a377f0 expression: use ParseTimeFormNum instead of ParseTime (#4706) 2017-10-09 12:10:24 +08:00
ca05619cdf expression: enforce error check (#4716) 2017-10-08 22:29:07 -05:00
1c99d41ca2 expression: Quit builtin function SLEEP when KILLed. (#4708) 2017-10-08 21:12:36 -05:00
3f4bdf6150 expression: rewrite unit test for Minus and Plus (#4691)
* expression: rewrite unit test for Minus and Plus

* move code
2017-09-30 11:47:26 +08:00
b4ad894b0a expression, plan: do come code clean and make golint happy (#4681) 2017-09-29 10:35:47 +08:00
56ed7f129d expression: change like function's behavior. (#4683) 2017-09-29 10:27:23 +08:00
07e8911628 *: reduce growslice (#4680) 2017-09-28 18:00:32 +08:00
459c4691b5 expression: remove useless code (#4672) 2017-09-28 16:03:04 +08:00
2d0041e134 *: add combination sql modes support(#4631) (#4633)
Fix #4631
2017-09-28 10:01:48 +08:00
1c4143e9e4 expression, types: remove the useage of "evalExprToXXX" functions (#4666) 2017-09-27 23:42:00 +08:00
a6756a4eee *: make insert with calculated value behave the same as MySQL. (#4603) 2017-09-27 19:59:31 +08:00
baee1bb864 expression, types, plan: remove the usage of "TypeClass" completely (#4654) 2017-09-27 12:39:44 +08:00
7943d0e843 expression, types: remove the usage of "TypeClass" in "builtin_compare.go" (#4649) 2017-09-26 23:33:56 +08:00
f89db5b6ec expression, types: export "evalTp" to "EvalType" and move it to package "types" (#4626)
* expression, types: export "evalTp" to "EvalType" and move it to package "types"

* add source file

* change "ETJSON" to "ETJson"
2017-09-26 11:25:27 +08:00
6f84392d40 *: optimize SortExec (#4622)
* *: change key of orderByRow from "key []types.Datum" to "key []*types.Datum"

* address comment
2017-09-25 19:50:26 +08:00
45bdd69cde *: support signature push down. (#4495) 2017-09-25 18:58:42 +08:00
e599ceec2b types: fix 'select cast(12.1 as decimal(3,4))' core. (#4612) 2017-09-24 21:17:17 +08:00
d2d14d8c48 *: 1. remove expression/typeinfer.go entirely (#4611)
2. remove the validator of sql like 'insert into t set a = 1, b = a'
2017-09-22 20:27:03 +08:00
25b5a2ce18 *: Refactor aggregation (#4605)
Aggregation results were stored in aggregation functions, so one map is created for each function to store different groups’ results, which requires much memory.
The aggregation functions are refactored and are now stateless, and the maps are kept in executor (executor.HashAggExec and mocktikv.aggregateExec) so that only one map is needed to store all the functions’ results, which reduced the memory usage.
2017-09-22 19:41:01 +08:00
a60bbd9560 expression: refactor "helper.go" (#4593) 2017-09-22 18:54:04 +08:00
069cc8b222 expression: open new expression framework by default (#4595) 2017-09-22 15:29:42 +08:00
bd01434de0 expression: remove the usage of "TypeClass" in "builtin_arithmetic.go" (#4575) 2017-09-22 13:52:10 +08:00
3c02f6bcdb expression, plan: remove typeinfer.go since we infer all types in expression rewrite phrase (#4536) 2017-09-22 13:22:46 +08:00
376a7ddbdd util/types,expression: fix parseDatetime for 11111111111 and 20170118.999 (#4273) 2017-09-21 14:55:05 +08:00
a12306c45e expression: remove the usage of "TypeClass" in "expression.go" (#4571) 2017-09-21 12:43:37 +08:00
a8b09d2761 expression: reorganize error messages for non-existent functions (#4582) 2017-09-21 12:14:50 +08:00
d089deb1b0 expression: remove the usage of "TypeClass" in "builtin_string.go" (#4573) 2017-09-21 10:30:11 +08:00
c899e5bb16 expression: rewrite builtin function: MOD (#4407) 2017-09-21 09:48:51 +08:00
dba31ef24a expression: remove the usage of "TypeClass" in "builtin_math.go" (#4568) 2017-09-21 09:33:16 +08:00
c9e17e8317 plan: wrap CAST on generation expressions. (#4501)
* plan: wrap CAST on generation expressions.
2017-09-20 19:49:34 +08:00
71c7470911 expression: remove the usage of "TypeClass" in "builtin_cast.go" (#4570)
* expression: remove the usage of "TypeClass" in "builtin_cast.go"
2017-09-20 19:43:38 +08:00
c92b124aa9 *: make test leak great again (#4543) 2017-09-20 17:07:32 +08:00
2439f173dc expression: move "Constant" to a standalone source file (#4583) 2017-09-20 15:02:30 +08:00
a2393245dd parser, ast, expression: support TIME/TIMESTAMP literal (#4368) 2017-09-19 16:37:29 +08:00
2762c44161 *: move aggregate functions to an individual package "aggregation" (#4549) 2017-09-18 15:07:35 +08:00
ae00bc2c04 expression: remove the usage of "TypeClass" in "builtin_op.go" (#4547) 2017-09-18 14:14:53 +08:00
f00206ff9b expression: correct error message for some builtin time functions (#4531) 2017-09-18 11:37:47 +08:00
74d5ce4bf1 mysql, sessionctx: refine set/get variable 'SQL_MODE' (#4530) 2017-09-15 23:56:38 +08:00
49e9b63a58 remove redundant 'FoldConstant' call in function 'EvaluateExprWithNull' (#4534) 2017-09-15 15:24:20 +08:00
1006dab277 expression: rewrite builtin function ADDTIME, SUBTIME (#4333) 2017-09-15 14:55:10 +08:00
4f07681065 parser, ast, expression: fix bug on DATE literal (#4362) 2017-09-15 14:29:31 +08:00
27f2594f31 expression: rewrite builtin function: ADDDATE, SUBDATE (#4504) 2017-09-14 19:16:37 +08:00
b812f324c3 expression: rewrite builtin function TIMEDIFF (#4496) 2017-09-14 15:45:04 +08:00