Commit Graph

137 Commits

Author SHA1 Message Date
1f9da091b8 util/types: change FieldType of exprNode to value instead of pointer (#1564) 2016-08-09 12:45:59 +08:00
6abc5d88b7 types: Fix bug for CalculateSum (#1497) 2016-07-25 12:04:53 +08:00
f5a6c962b5 *: Change ctx.Value from interface{} to Datum (#1494) 2016-07-25 10:42:54 +08:00
8749945b0c *: add builtin function greatest (#1463) 2016-07-20 11:32:14 +08:00
0450ba0b47 *: unify "See url" format (#1391)
* *: unify "See url" format
2016-07-05 11:21:10 +08:00
1a706853ed Rename err2 to err1 where possible (#1331) 2016-06-19 08:33:33 +08:00
004500171e *: Refactor datum arithmetic codes and support Add/Div in xeval. (#1311)
Prepare for aggregate function sum/avg.
2016-06-13 11:24:07 +08:00
e3597b6548 Add Datum.IsNull() fucntion (#1298)
Add IsNull function for Datum to simplify null check.
2016-06-07 23:35:25 +08:00
75f089d056 util/types: clean up, removed unused code. (#1281) 2016-06-02 10:42:36 +08:00
ced939df5d types: Tiny cleanup (#1270)
Fix typo
2016-05-31 12:49:43 +08:00
4c339c567d util/types: parse float with best effort. (#1264)
For example, "1.1a" should parsed to 1.1 rather than 0.
2016-05-30 14:26:41 +08:00
e22d8d06da *: xapi push down mysql.Duration and mysql.Decimal. (#1243) 2016-05-20 18:30:30 +08:00
f6e7a331d0 codec: fix datum convert to float32. (#1217) 2016-05-10 16:07:18 +08:00
0841dbef9b *: Support builtin function round(X), round(X, D) (#1208)
Support builtin function round(X), round(X, D)
2016-05-07 13:38:02 +08:00
3671f3958f xapi: support IN expression push down. (#1147)
* xapi: support IN expression push down.
2016-04-25 19:50:33 +08:00
d78e4044cc *: fix misspells (#1143) 2016-04-22 11:30:37 +08:00
895e9a0d86 *: fix issue#1089 and add tests (#1106) 2016-04-18 17:31:49 +08:00
bfa3ed7a2d *: Fix issue #1071 (#1088)
* *: fix issue#1071 and add tests

* util: use RoundFloat in the ToBool and add tests.
2016-04-14 16:56:24 +08:00
a236ab94f3 xapi/xeval: implement tipb.Expr evaluator. (#1063)
* xapi/xeval: implement tipb.Expr evaluator.

* *: address comment

* xapi/xeval: update import
2016-04-08 14:25:17 +08:00
08034540f0 *: Add leak test
* *: add leak test and tiny clean up

* *: unify test format and add leak test

Conflicts:
	store/localstore/compactor_test.go
	mysql/error_test.go
*: add leak test
2016-04-07 20:53:45 +08:00
e697aa3e7e *: Unify import check format and unify test format 2016-04-06 10:47:44 +08:00
86f4459543 util: Reserve mysql.Time change. 2016-03-31 18:49:17 +08:00
beb76cde02 Util: a optimization of mysql.* in Datum
We can use the space of Datum to save mysql.* to save the cost of interface.
2016-03-30 19:50:14 +08:00
8552e1fe43 Address comment. 2016-03-30 13:52:03 +08:00
136e405c04 Util: a optimization of mysql.Bit in Datum
We can use the space of Datum to save mysql.Bit to save the cost of interface.
2016-03-30 13:13:50 +08:00
afdf9a4ef6 Change mysql.Time to ptr in datum.
In this way, we can save the cost of the alloc of mysql.Time in interface.
In the future, we will change all mysql.Time to ptr to save the cost of copy mysql.Time struct.
2016-03-29 18:42:16 +08:00
c3461363bf Merge pull request #1014 from pingcap/shenli/issue-1012
executor: Fix replace statement conflict with multiple row bug.
2016-03-25 16:49:55 +08:00
08bf548700 *: Fix replace statement conflict with multiple row bug.
Fix: https://github.com/pingcap/tidb/issues/1012
2016-03-25 16:40:12 +08:00
419f244031 evaluator: change interface to datum in evaluator package.
Change the remaining string functions.
2016-03-25 12:01:58 +08:00
c960c81d86 evaluator: Change the interfaces of builtinConcat to datums.
Change the interfaces of builtinConcat to datums.
2016-03-21 16:31:03 +08:00
47cb1d6626 evaluator: change math and time parma interface to datum
Change math and time parma interface to datum.
2016-03-16 13:03:54 +08:00
65fd9a77c6 Change bool to int64. 2016-03-11 20:27:01 +08:00
0fa8df585a evaluator: change SetDatum and implement ToBool, ToInt
Change SetDatum and implement ToBool, ToInt.
2016-03-11 19:58:40 +08:00
5a81a2f5d4 evaluator: change Get/SetValue to Get/SetDatum.
Chnage Get/SetValue to Get/SetDatum in evaluator.go .
2016-03-11 13:37:58 +08:00
f1db0e42ef types: Fix i386 float to uint error
uint64(float64(-1)) will be 0. So we cast float64 to int64 first.
2016-03-08 15:53:50 +08:00
ac12b71714 *: replace interface{} with Datum in convert. 2016-03-07 14:11:17 +08:00
11942ab3a1 util/types: fix compare datum. 2016-03-04 14:35:35 +08:00
ff94659286 *: replace interface{} with Datum in index range 2016-03-03 22:15:17 +08:00
d5941446c2 table: replace interface{} with Datum in table. 2016-03-02 21:01:20 +08:00
af131d2127 executor: replace Executor interface{} with Datum. 2016-03-02 16:13:25 +08:00
3a25f68469 *: replace interface with Datum in ast.Row. 2016-03-02 15:32:42 +08:00
43a6064395 *: Cleanup license 2016-03-02 14:02:26 +08:00
dec809a4aa *: address comment. 2016-03-02 10:39:32 +08:00
e71e25e31c util/types: new Compare implementation with Datum. 2016-03-02 10:22:21 +08:00
d9f98132ee ast: introduce 'Datum'
Datum is a value box intended to replace 'interface{}' for better performance and easier to use.
2016-03-01 10:54:59 +08:00
f703633295 Merge pull request #861 from pingcap/shenli/agg-sum
*: Support sum in new plan
2016-01-20 22:24:28 +08:00
eba936c579 *: Address comment 2016-01-20 21:49:29 +08:00
686dc63352 *: Support sum in new plan 2016-01-19 22:58:11 +08:00
bde19d022d util/types: use RawData() to enhance readability 2016-01-19 16:14:41 +08:00
31a78b75f2 util/types: fix order by binary operand
In Orderby Clause, as using BINARY operator to cast the  following operand to a binary string, here meet an error. Improved IsOrderedType() to handle it.
2016-01-19 13:46:16 +08:00