Commit Graph

82 Commits

Author SHA1 Message Date
77572f873d planner: do not push down the aggregation function with correlated column (#21453) 2020-12-08 10:54:24 +08:00
0c36203f1d expression: add new scalar function IsTruthWithNull (#19621) 2020-09-09 16:03:10 +08:00
8bbeceb5ee expression: support handle two collation cannot substituted to each other (#19036) 2020-08-18 15:07:39 +08:00
6a49bb4a84 *: fix a bug which causes function return truncated result (#17101) 2020-05-12 12:54:35 +08:00
692e0098b1 expression: avoid Order By constant expression error when pl… (#16261) 2020-04-21 20:04:23 +08:00
ac8785a978 expression: fix wrong constant propagation with the collation (#16227) 2020-04-16 14:10:10 +08:00
d26875db7e expression: fix error PushDownNot for contiguous NOT (#16108) 2020-04-15 17:52:14 +08:00
fde73403fd expression: Add format_bytes and format_nano_time performance schema functions (#14975) 2020-03-06 11:50:46 +08:00
55f5cf538d planner/expression: constant propagation and predicate pushdown should be aware of plan cache (#14941) 2020-03-04 16:23:17 +08:00
1d641955d5 expression: disable int_col <cmp> non-int const folding for plan cache (#14120) 2020-01-15 18:42:20 +08:00
aca3f47292 *: Refactoring reading logic of virtual generate column (#12407) 2019-11-13 17:39:53 +08:00
43202b1383 expression, ranger: three optimizations to speedup some specific query's opt time (#12687) 2019-10-29 18:00:45 +08:00
59942ab4cc optimizer: presolve before expr propagation, and try reducing newFunc call in pa… (#12592) 2019-10-17 10:46:18 +08:00
a582640dc3 executor: make point updates go short path (#12243) 2019-09-27 18:36:01 +08:00
c59933323a expression: fix constItem() and column-pruning in order by clause (#11839) 2019-08-28 16:59:35 +08:00
4cd5d15d97 *: improve plan cache param eval and insert const (#10746) 2019-08-27 11:11:01 +08:00
c8d1ff7ca6 *: replace 'logutil.Logger(context.Background())' with 'logutil.BgLogger()' (#10866) 2019-06-21 19:13:31 +08:00
ae58fd01f1 expression: improve UT coverage of expression package to 80% (#10641) 2019-05-30 11:05:22 +08:00
0106361cd9 expression: let PushDownNot does not change the argument (#10363) 2019-05-06 16:22:19 +08:00
9630d57c80 planner/core: make join reorder by dp work (#8816) 2019-04-28 13:08:46 +08:00
085746c254 expression: check corCol in DisableParseJSONFlag4Expr (#10224) 2019-04-22 19:31:08 +08:00
ba26012231 expression: using pingcap/log and unify the log format (#9507) 2019-03-14 19:05:27 +08:00
6e8cd3c7dd executor: support window function nth_value (#9596) 2019-03-12 00:42:37 +08:00
5a283a98dd plan/executor: make semi joins null and empty aware (#9051) 2019-02-25 15:42:38 +08:00
bc0e70dc5c planner/core: implement skyline pruning (#9337) 2019-02-19 11:19:30 +08:00
469fa877d6 util/hack: define a MutableString type for function hack.String (#9230) 2019-02-12 12:30:40 +08:00
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
63e7dacf8d expression: do not set ParseToJSONFlag to a JSON column (#8564) 2018-12-12 13:36:44 +08:00
d9e02b76dd expression: remove redundant "errors.Trace()" in "expression" package (#8609) 2018-12-07 12:20:31 +08:00
c677187728 plan: support ? in Order By / Group By / Limit Offset clauses (#8206) 2018-12-03 21:48:54 +08:00
34c3d4ccc6 planner,executor,parser: support the prepared plan cache for insert/delete/update statements (#8107) 2018-11-05 14:24:48 +08:00
32b1dbd8d5 *: rename "github.com/pkg/errors" to "github.com/pingcap/errors" (#8136)
We import "github.com/pkg/errors" in the code, and actually put
the "github.com/pingcap/errors" there in the vendor path.
That's a dirty hack, and prevent the introduce of Go module.
2018-11-01 16:09:07 +08:00
89dda9d9a8 *: move parser to a separate repository (#8036) 2018-10-25 11:12:10 +08:00
73cab9252d Fix some misspells (#7830) 2018-10-08 09:40:03 +08:00
506dcceea2 plan: enhance predicate pushdown over join (#7645)
Derive superset of DNF predicates and push it to children plan nodes as much as possible.
2018-09-17 14:36:52 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
15e709ca0d plan: change the logic of converting to index join (#7553) 2018-09-05 13:18:32 +08:00
06021c7cfe remove types.Row interface (#7170) 2018-07-27 13:45:03 +08:00
5a5aeb813a expression, plan: no longer call expression.Clone in plan package except ResolveIndices (#6866) 2018-06-29 16:25:26 +08:00
aa76a6eeba plan, executor: correlated column can be pushed down. (#6403) 2018-05-07 19:43:02 +08:00
9fc856297c expression: support simple expression rewriter (#6432) 2018-05-04 09:20:21 +08:00
cd63332ebf expression, plan: extract the same part from DNF's leaves. (#5831) 2018-02-26 16:03:05 +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
76f9e3e03b statistics,expression: reduce allocation for DetachCondsForSelectivity, add a Filter function (#5482) 2017-12-26 15:01:28 +08:00
0b5c0cf94d expression,plan: make function ExtractColumns more efficient (#5435)
The old recursive function signature make many unnecessary allocation:
func ExtractColumns(expr Expression) (cols []*Column)

Recursive call on this one would be much better:
func extractColumns(result []*Column, expr Expression, filter func(*Column) bool) []*Column
2017-12-18 22:41:45 -06:00
640c4913e0 stats/selectivity: remove useless clone (#5283) 2017-12-01 21:22:55 +08:00
62433663e5 util/types: change types path (#5007)
* util/types: change types path
2017-11-04 10:37:14 -05:00
ad1c532ea5 *: remove unused package and functions (#5003)
* *: remove unused package and functions
2017-11-04 03:36:25 -05: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