Commit Graph

196 Commits

Author SHA1 Message Date
e30af15e28 planner/core: move useless equal conditions to other conditions for generating index join plan (#9562) (#9601) 2019-03-12 20:53:36 +08:00
353b216b7a planner, executor: check col.OrigColName instead of col.ColName in isCoveringIndex (#9637) 2019-03-12 10:19:26 +08:00
6e8cd3c7dd executor: support window function nth_value (#9596) 2019-03-12 00:42:37 +08:00
612dd14fd4 planner/core: fix unexpected error of window function (#9567) 2019-03-11 21:10:23 +08:00
ec208f5484 planner: the expression field name disappears when there's window function (#9644) 2019-03-11 19:01:41 +08:00
45c9458236 planner: fix select denied message (#9627) 2019-03-11 18:38:08 +08:00
Fox
4fb66b9304 planner: cleanup unnecessary warning in join elimination (#9631)
<!--
Thank you for contributing to TiDB! Please read TiDB's [CONTRIBUTING](https://github.com/pingcap/tidb/blob/master/CONTRIBUTING.md) document **BEFORE** filing this PR.
-->

### What problem does this PR solve? <!--add issue link with summary if exists-->

Fix #9590
### What is changed and how it works?
Return err to optimizer instead of using log.warn which may cause unnecessary and annoying warnings printed when eliminating outer join.

### Check List <!--REMOVE the items that are not applicable-->

Tests <!-- At least one of them must be included. -->

 - No code

Code changes

 - Has interface methods change


Side effects


 - Increased code complexity


Related changes
2019-03-11 17:55:29 +08:00
0bec639074 planner: correct ExpectedCnt for children plans of join (#9497) 2019-03-11 15:08:02 +08:00
3045359b4e planner: Fix Error message about select ... inner join (#9626) 2019-03-10 23:08:25 +08:00
85c4553c4e planner: chose outer table based on cost when both tables are specified in TIDB_INLJ (#9579) 2019-03-08 13:25:44 +08:00
e6b1c4cfae planner: fix window func support (#9605) 2019-03-07 23:28:56 +08:00
2b646cb58b planner, executor: handle default frame for window functions (#9544) 2019-03-06 19:37:30 +08:00
d094a0fc97 planner: convert SemiJoin to InnerJoin in more cases (#9546) 2019-03-05 11:36:57 +08:00
d81f65f577 planner: fix false negative "full group by" check for agg in subquery (#9542) 2019-03-04 18:52:44 +08:00
e7ff050a45 planner, executor: support SQL show pump/drainer status (#9456) 2019-03-04 15:39:54 +08:00
f16081bccc planner/core: code refactor around join reorder (#9439) 2019-03-04 13:52:05 +08:00
560e8cfe57 *: sleep 0 when retry whole transaction (#9454) 2019-03-02 13:16:28 +08:00
4f232e5c8d executor: add CREATE ROLE support (#9461) 2019-03-01 10:07:28 +08:00
8b84b94c96 *: fix union scan for partitioned table (#8871) 2019-02-28 13:43:45 +08:00
839772b528 don't cast AggFuncs' arguments when they are Partial2Mode (#9340) 2019-02-27 14:33:03 +08:00
45f9d6a00f statistics: compute and store column order correlation with handle (#9315) 2019-02-27 11:32:00 +08:00
a59a5f41e1 planner, executor: support range framed window functions (#9450) 2019-02-27 10:07:28 +08:00
H
f80e401b80 planner/core: fix wrong behavior of prepare && execute (#9204) 2019-02-25 16:44:15 +08:00
5a283a98dd plan/executor: make semi joins null and empty aware (#9051) 2019-02-25 15:42:38 +08:00
f105b710ca planner: remove correlated column sort items (#9435) 2019-02-25 14:48:44 +08:00
2f3842a8da executor, planner: refine merge join compare methods to avoid some rare cases (#9390) 2019-02-25 14:19:26 +08:00
aabd330d1e *: support "show create user" (#9240) 2019-02-21 13:58:19 +08:00
d3325c8a70 planner: refactor 'Can't find column' panic to error (#9326) 2019-02-20 11:29:56 +08:00
231ce8f75a planner: change the cost formula for join reorder (#9303) 2019-02-19 18:46:06 +08:00
40fa006cac *: collect coprocessor runtime stats for explain analyze (#9057) 2019-02-19 16:22:00 +08:00
bc0e70dc5c planner/core: implement skyline pruning (#9337) 2019-02-19 11:19:30 +08:00
b845f2a4da executor, planner: support show create view (#9309) 2019-02-19 10:18:57 +08:00
ed7bb00417 planner, expression: support builtin function NAME_CONST (#9261) 2019-02-19 10:02:46 +08:00
c468f02bb0 planner: remove constant sort items after substitution (#9333) 2019-02-18 10:57:35 +08:00
d09e0e36b8 planner, privileges: add CreateViewPriv Support (#9153) 2019-02-15 17:11:40 +08:00
a9c7c70596 planner, executor: inject proj below TopN and Sort if byItem contains scalarFunc (#9197) 2019-02-15 15:34:30 +08:00
0081e17b02 expression, planner: support builtin function benchmark (#9252) 2019-02-13 19:53:28 +08:00
18ff4f953e planner/core: refine explain for window function (#9270) 2019-02-13 15:23:00 +08:00
9bdba3a5d1 plan: handle DNF expressions in Selectivity (#9282) 2019-02-13 10:53:12 +08:00
469fa877d6 util/hack: define a MutableString type for function hack.String (#9230) 2019-02-12 12:30:40 +08:00
4ad4684da1 privilege,planner: handle View's security privilege check (#9194) 2019-02-12 10:35:18 +08:00
e1667966ac planner: fix assertion failure on LogicalJoin.EqualConditions (#9066) 2019-02-11 11:45:15 +08:00
3d614e0965 planner: enable function any_value in aggregation if ONLY_FULL_GROUP_BY is set (#9255) 2019-02-10 10:03: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
H
6a06977dd1 plan: rewrite exact like expression to equal condition (#9071) 2019-01-28 19:12:30 +08:00
89f4e640fb *: remove unused tidb/terror (#9138) 2019-01-21 19:03:22 +08:00
776c90fa79 planner: check null and empty for != any(subq) and = all(subq) (#9106) 2019-01-21 16:17:48 +08:00
54b6de0880 planner: improve error messages for mysql compat (#9112)
SHOW CREATE TABLE
CREATE USER
DROP USER
2019-01-18 20:58:46 +08:00
0fdc526b42 planner: support window function frame clause (#9004) 2019-01-18 16:46:54 +08:00
572ad80e23 planner: set correct mysql error code (#9095) 2019-01-17 15:01:03 +08:00