Commit Graph

137 Commits

Author SHA1 Message Date
09a5c8028e plan: derive col is not null from col op col conditions (#8603)
Check whether the `op` condition is null rejected, if yes, derive
`col is not null` for both sides of inner join, and for inner side
of outer join.

Also, remove duplicate conditions before pushing them down. Check
if the condition is mutable before removing duplicates.

For AntiSemiJoin, AntiLeftOuterSemiJoin and LeftOuterSemiJoin, do
not generate new `is not null` conditions.
2019-01-30 10:53:46 +08:00
2f6639d12b expression: add builtin function tidb_parse_tso (#8385) 2018-11-28 22:37:44 +08:00
29f14d4178 *: change default charset and collation from 'utf8 utf8_bin' to 'utf8mb4 utf8mb4_bin' (#7965) 2018-11-09 16:32:21 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
893d546222 expression: json builtin function archetypes (#7651) 2018-09-10 22:17:07 +08:00
30ae420242 expression: support builtin function json_contains_path (#7596) 2018-09-09 12:32:15 +08:00
3f5bd3bb28 expression: support builtin function json_contains (#7443) 2018-09-07 12:45:13 +08:00
a8012590dc *: fix union result when mix signed/unsigned columns (#7112) 2018-07-30 13:48:44 +08:00
06021c7cfe remove types.Row interface (#7170) 2018-07-27 13:45:03 +08:00
46da21b5c1 *: support select tidb_is_ddl_owner, to figure out whether tidb instance is ddl owner (#6682) 2018-06-01 17:56:44 +08:00
357d5df66b remove useless alias (#6473) 2018-05-05 22:36:54 +08:00
f21483e6ed expression: add Clone() for builtinFunc 2018-04-11 10:00:19 -05:00
4f991afb10 *: session context passed to newBaseBuiltinFuncWithTp should not be nil (#6178) 2018-03-29 16:12:36 +08:00
0553deeb42 *:improve code readability and unified aliases (#5997) 2018-03-15 10:52:36 +08:00
12c87929b8 *:fix some golint && ineffassign && misspell to improve GoReport Result (#5867) 2018-02-23 19:31:05 +08:00
4e1a114e68 *: move package context to sessionctx (#5890) 2018-02-22 18:03:38 +08:00
970e5b5684 *: replace JSON with BinaryJSON (#5460) 2017-12-21 15:20:17 +08:00
62433663e5 util/types: change types path (#5007)
* util/types: change types path
2017-11-04 10:37:14 -05:00
c4f29301eb expression: rewrite in behavior. (#4813) 2017-10-28 14:36:21 +08:00
0306bb0070 tidb: support a plan cache for prepared statements (#3956)
* tidb: support a plan cache for prepared statements
2017-10-24 00:55:51 -05:00
ed7f68ca9b *: Add Row interface (#4859) 2017-10-23 11:36:28 +08:00
64bc8cb6cb expression: remove "self" field in "baseBuiltinFunc" completely (#4766)
* expression: remove "self" field in "baseBuiltinFunc" completely

* address comment
2017-10-13 04:55:25 -05:00
60626912a7 expression, plan: remove "foldable" from "baseBuiltinFunc" (#4759) 2017-10-12 04:03:54 -05:00
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
b4ad894b0a expression, plan: do come code clean and make golint happy (#4681) 2017-09-29 10:35:47 +08:00
459c4691b5 expression: remove useless code (#4672) 2017-09-28 16:03:04 +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
45bdd69cde *: support signature push down. (#4495) 2017-09-25 18:58:42 +08:00
069cc8b222 expression: open new expression framework by default (#4595) 2017-09-22 15:29:42 +08:00
c899e5bb16 expression: rewrite builtin function: MOD (#4407) 2017-09-21 09:48:51 +08:00
a2393245dd parser, ast, expression: support TIME/TIMESTAMP literal (#4368) 2017-09-19 16:37:29 +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
d82a36b562 expression: rewrite builtin function: INSERT (#4414) 2017-09-07 19:26:59 +08:00
29f7b570c4 expression: rewrite "fieldTp2EvalTp()" to use "mysql.TypeXXX" instead of "TypeClass" (#4467) 2017-09-07 16:46:18 +08:00
0b04d1c6c7 expression: rewrite builtin JSON functions under the new framework. (#4367) 2017-09-06 14:42:35 +08:00
92bea5afa4 expression: rewrite builtin function: INTDIV (#4213) 2017-09-05 20:03:02 +08:00
55bbc41069 expression: adjust getFunction context.Context param position (#4400) 2017-09-01 16:03:19 +08:00
f0aad43fec expression: change isDeterministic to canBeFolded (#4393) 2017-08-31 20:35:13 +08:00
9ae2639077 expression: NOW() should be folded in constant folding stage (#4385) 2017-08-31 12:23:11 +08:00
c9b62fbdda expression: add json into builtin if function. (#4203) 2017-08-29 17:32:10 +08:00
f564022e59 expression: set pb code for signatures. (#4358) 2017-08-29 13:45:31 +08:00
f02a615bed expression: remove useless error return (#4347) 2017-08-28 20:34:30 +08:00
f289c9bd25 expression: fix date cmp date (#4294) 2017-08-24 14:50:40 +08:00
31819a8dcb parser, expression: implement builtin function: LAST_DAY (#4290) 2017-08-23 16:34:35 +08:00
7a488163d0 expression: rewrite builtin function: DIV (#4180) 2017-08-17 20:47:17 +08:00
6917e8588e expression: fix type inference of function CASE (#4219) 2017-08-17 20:37:07 +08:00
6733b6f75b expression: rewrite builtin function: NULLIF (#4170)
* rewrite nullif() to if()
2017-08-15 17:19:39 +08:00
b23901b187 *: rewrite function IN to DNF (#4174) 2017-08-15 14:28:43 +08:00