Commit Graph

926 Commits

Author SHA1 Message Date
de992eb570 expression: only do a shallow copy when evaluating a "Column" expression (#5542) 2018-01-06 12:24:30 +08:00
07dc46d3cb expression: refactor hybrid type expressions (#5550) 2018-01-06 11:04:50 +08:00
bc459c5261 executor: support Chunk for HashAggExec (#5244) 2018-01-06 10:21:52 +08:00
8b149c3323 Prealloc / collides with package name (#5560) 2018-01-05 19:15:54 +08:00
73e47e0e30 plan: refine the design of schema (#5541) 2018-01-05 12:54:24 +08:00
97ae04a37c expression: consider time zone for builtin function curtime/sysdate/curdate (#5548) 2018-01-04 16:40:09 +08:00
fea4b02ff3 expression, types: "Flen" and "Decimal" of "TypeNewDecimal" should not be -1 (#5523)
* expression, types: "Flen" and "Decimal" of "TypeNewDecimal" should not be -1
2017-12-31 12:23:04 +08:00
b1e1a26151 types: refine Time type (#5521)
remove redundant fields, makes it easier to fit in Chunk.
2017-12-30 19:30:35 +08:00
f8177996e7 plan: refine code about maxonerow (#5501) 2017-12-29 14:48:01 +08:00
95a5c8ce5a expresion, executor: correct the type inference of function "sum" and "avg" (#5495) 2017-12-26 18:16:52 +08:00
76f9e3e03b statistics,expression: reduce allocation for DetachCondsForSelectivity, add a Filter function (#5482) 2017-12-26 15:01:28 +08:00
100bc58a83 parser, variable: fix #5478, make 'set transaction read only' works. (#5483) 2017-12-25 21:36:15 +08:00
04a91532b8 expression: fix return type and decimal len for builtin aggregation function 'avg' and 'sum' (#5292)
* expression: fix return type and decimal len for builtin aggregation function 'avg' and 'sum'

* Code format refine

* Code format refine

* Fix frac for avg
2017-12-25 21:15:37 +08:00
0dee2ab0e7 expression: fix VectorizedFilter (#5477)
* expression: fix VectorizedFilter

A filter may not be of Int type, we check the filter's type first or Call `EvalBool`.
Another solution is to wrap an ` != 0 ` to the expression, but that is not as simple as this one.

* *: add TODO
2017-12-25 11:48:20 +08:00
970e5b5684 *: replace JSON with BinaryJSON (#5460) 2017-12-21 15:20:17 +08:00
6b6afb6c55 expression, plan: support builtin aggregation function 'bit_or' (#5145) 2017-12-19 05:51:08 -06: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
f8c0aaf0c9 parser, expression: support SEPARATOR in group_concat aggregate function (#5420) 2017-12-15 16:36:13 +08:00
f1e89cde19 *: use lower-case of github.com/sirupsen/logrus (#5400)
*: rename github.com/Sirupsen/logrus to github.com/sirupsen/logrus

* vendor: update pd

* vendor: update github.com/pingcap/tipb/go-mysqlx
2017-12-14 16:25:58 +08:00
12299b826a expression: support date_format push down (#5386)
* support date_format push down

* add expr_to_pb test

* Update vendor
2017-12-13 13:29:01 +08:00
6ca4382dba *: fix update JSON field. (#5345) 2017-12-11 11:39:14 +08:00
38f794d875 plan, executor: add physical proj and topn. (#5316) 2017-12-06 13:30:58 +08:00
c46f289d5a expression, plan: support builtin aggregation function 'bit_xor' (#5090) 2017-12-05 19:32:27 +08:00
6c68e41f73 store/tikv: use go fail for some tests. (#5280)
* store/tikv: use go fail for some tests.
2017-12-01 08:20:30 -08:00
640c4913e0 stats/selectivity: remove useless clone (#5283) 2017-12-01 21:22:55 +08:00
c6e8f36835 *: avoid double Close() executor during test (#5285) 2017-12-01 18:13:50 +08:00
ba1979c2de executor: support Chunk for SelectionExec (#5211) 2017-11-30 16:30:28 +08:00
ae9d7f5dab *: set session variable MaxChunkSize to 2 for test (#5238) 2017-11-28 13:48:36 +08:00
fb610e6429 *: change executor Next() interface to Next(goctx.Context) (#5223) 2017-11-26 21:17:33 -06:00
9ac1c08bf8 ast, plan, expression: support builtin aggregation function 'bit_and' (#5147) 2017-11-24 09:58:41 +08:00
191de50646 chunk: make chunk.Row iteratable (#5196) 2017-11-23 12:45:09 +08:00
ced6efc7f4 expression: support vectorized execution of expressions (#5184) 2017-11-22 23:41:36 +08:00
02f6bb27c7 *: remove goCtx from session struct (#5174)
1. go context should not be stored
2. change Executor interface to Open(goctx.Context)
3. many other changes forced by this refactor
2017-11-22 02:17:38 -06:00
9921f41491 types: add overflow truncate when convert str to float (#5130) 2017-11-22 15:52:23 +08:00
8892bdf373 types: fix invalid time cast bug (#4338) 2017-11-22 15:24:56 +08:00
f828016e9f *: move sessionctx/domainctx.go to domain package (#5168) 2017-11-22 13:41:58 +08:00
55b8f9f1ee executor, expression: support Chunk in ProjectionExec (#5178) 2017-11-22 13:34:03 +08:00
8b15cb52b7 *: move StatementContext to its own package. (#5177) 2017-11-22 00:11:14 +08:00
3f212a6133 expression: fix from_unixtime(val>MaxInt32) (#5170) 2017-11-21 16:53:43 +08:00
dd2812fa55 mysql, expression: support sql_mode 'PAD_CHAR_TO_FULL_LENGTH' (#5065) 2017-11-21 13:22:29 +08:00
a32b8dbcf6 *: use Chunk for TableReader. (#5142) 2017-11-21 10:08:50 +08:00
81652dbeef *: remove returned value isNull in Row methods. (#5131) 2017-11-17 11:12:41 +08:00
e362f1ed56 types: add deepcopy for update operation (#5098) 2017-11-15 14:46:24 +08:00
5962f1404e *: prealloced plan aggregation_push_down (#5094) 2017-11-15 12:55:17 +08:00
e1511d03aa plan, expression: move typeinfer_test.go from plan to expression (#5096) 2017-11-14 02:45:40 -06:00
5c76863a79 plan, expression: remove useless error return (#5085) 2017-11-13 18:40:58 +08:00
32dd95be51 plan: no need to double read in some case. (#5079) 2017-11-13 14:46:21 +08:00
8fd5c7de6e server: use types.Row to write result set. (#5056) 2017-11-10 15:41:02 +08:00
96809723b7 expression: support sql_mode NO_UNSIGNED_SUB (#5030) 2017-11-09 14:23:42 +08:00
1aa2a69f92 expression: remove type assertion on types.DatumRow. (#5005) 2017-11-07 14:17:53 +08:00