Commit Graph

500 Commits

Author SHA1 Message Date
071caf940e plan: support pushing agg across projection. (#2156) 2016-12-02 22:56:25 +08:00
5738e7fc18 plan: support pushing agg past union all. (#2150) 2016-12-02 18:16:51 +08:00
d1b5f05a88 plan: Fix date_format type infer (#2152)
See: http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format
2016-12-02 14:21:48 +08:00
850b29e98b plan: update gby cols for pushed agg. (#2145) 2016-12-01 19:23:14 +08:00
ad30a5b18f plan: fix the value of attribute correlated of HashAgg (#2140) 2016-12-01 11:31:36 +08:00
0b828d46f8 *: add context in baseplan, extract constant folder. (#2135) 2016-12-01 00:17:55 +08:00
33dc01f564 plan: fix panic when explain (#2136) 2016-11-30 19:12:33 +08:00
b09f97d1f4 plan/validator: add grammar check of constraints when create table (#2129) 2016-11-29 20:25:54 +08:00
ebfcd3df92 validator: check duplicate key cols when create table (#2123) 2016-11-29 15:58:55 +08:00
ebcf494e69 plan: cut unuseful search branch to improve performence. (#2124) 2016-11-29 15:00:09 +08:00
5230f5eabd variable: define StatementContext. (#2121)
StatementContext is used to hold statement execution mode and state.
As every computation need this, there are many API changes.
2016-11-29 14:25:38 +08:00
e0c9aa71f2 plan: fix a resolve bug. (#2113) 2016-11-29 12:03:18 +08:00
743e58772c plan: remove unnecessary log (#2117) 2016-11-29 08:26:21 +08:00
2c34a75aba ddl: check duplicated cols when execute alter table add index (#2103) 2016-11-28 15:06:17 +08:00
3c349259e4 *: basic support for builtin function STR_TO_DATE (#2078) 2016-11-28 14:17:32 +08:00
36f0f307a8 parser: support show events (#2099)
* parser: support show events
2016-11-27 22:49:49 +08:00
f0db619009 *: refactor constant propagation. (#2087) 2016-11-27 16:21:12 +08:00
ea894e8b77 *: Add a function GenByArgs for Error (#2033)
*: Add a function GenByArgs for Error
2016-11-27 13:18:43 +08:00
2225c90857 plan: process in subquery correctly. (#2093)
* plan: process in subquery correctly.
2016-11-25 19:03:06 +08:00
9de3e70b6b plan: handle the missing err to avoid panic. (#2096) 2016-11-25 16:28:42 +08:00
73f2ffad90 varsutil: remove dependency on 'types' for 'variable' package (#2095)
* varsutil: remove dependency on 'types' for 'variable' package

'variable' package will be used in 'types', remove dependency on 'types' by
moving functions to a new 'varsutil' package.

Also extract 'SetExec' from 'SimpleExec'
2016-11-25 13:44:49 +08:00
13ba6e1989 plan: refine code for not between. (#2076) 2016-11-25 11:38:29 +08:00
440abb21f2 plan: set apply's innerplan be the second child of it. (#2092) 2016-11-25 11:07:41 +08:00
b19cc75a94 mysql, types: move MyDecimal and Time from 'mysql' to 'types' package. (#2082)
So we don't need to handle sql mode in 'mysql' package, avoid potential dependency cycle.
2016-11-24 10:50:31 +08:00
7a8c3c32a7 distsql: push nullif down (#2068)
* distsql: support pushing nullif down
2016-11-23 20:46:54 +08:00
d179a84610 plan: correct enforcer's correlated attribute. (#2079) 2016-11-23 20:04:23 +08:00
2a3426ca9d *: make explain result more clearly. (#2063) 2016-11-23 18:58:12 +08:00
3683d5f950 plan & expression: split the logic of column pruning and indices resolving. (#2051) 2016-11-23 18:01:27 +08:00
23136f8e0f distsql: push ifnull down (#2067) 2016-11-23 17:35:30 +08:00
79a8c3fc8d plan: add a Cache plan in physical plan (#2052)
plan: add Cache plan

* format code

* tiny change

* optimize the logic of code

* rename some variable and optimize logic

* move e.cursor++ down
2016-11-23 15:53:44 +08:00
0af8520a78 sessionctx/variable: remove dependency on context package. (#2064)
Makes using session variable easier and faster.
Prepare for use session variable to handle data truncated error.
2016-11-23 14:39:48 +08:00
951f88294d distsql: support pushing isnull down (#2069) 2016-11-23 11:35:53 +08:00
af5b0e71fc infoschema: implement infoschema table. (#2034)
Creates a information schema specific table that implements table.Table interface.
The rows in this table is generated by `[]*model.DBInfo` on request.

Further reduce memory allocation.
2016-11-21 19:47:41 +08:00
d7318e72bd plan: distinguish the physical plan test and logical plan test. (#2042) 2016-11-21 14:20:52 +08:00
8fa03ee0ab plan: process wildstar correctly. (#2038) 2016-11-20 21:02:29 +08:00
eafda5ee61 plan: remove old validator logic (#2013) 2016-11-18 13:24:20 +08:00
2f1cd5be00 plan: make explain result more explicit (#2022) 2016-11-17 18:05:18 +08:00
fdb74960a4 add a new expression type: Correlated Column. (#1973) 2016-11-17 12:42:12 +08:00
2a07230c46 Merge branch 'master' into hanfei/clean 2016-11-15 12:47:25 +08:00
421ceeb8fa *: make golint happy. 2016-11-15 11:12:24 +08:00
70846fb43c clean useless code. 2016-11-14 18:36:57 +08:00
de1714845d plan: adjust index cost calculation algorithm. (#1975) 2016-11-10 15:56:22 +08:00
cbf024e8f7 *: clean code. (#1987) 2016-11-10 15:38:22 +08:00
e17644716d refactor show clause. (#1940) 2016-11-10 11:14:37 +08:00
5d3bb33afd util/types: fix decimal conversion. (#1979)
When datum converts to decimal, we should check the Flen and Decimal of
the given field type, return max value for overflow and round the value
for truncation.
2016-11-09 16:53:30 +08:00
9946941089 plan: add the missing filer conditions (#1977) 2016-11-09 10:12:37 +08:00
c12a53fd9e plan: fix a panic bug when involved join and order by. (#1963) 2016-11-08 16:11:10 +08:00
f40b9f284c plan: consider multiple in expressions when calculating range. (#1961) 2016-11-08 15:44:29 +08:00
2e8941aa4d plan: adjust cost factor to make right agg plan. (#1962) 2016-11-08 14:18:44 +08:00
af514c8bda support pushing if down to kv (#1947) 2016-11-07 22:26:22 +08:00