Commit Graph

122 Commits

Author SHA1 Message Date
a9de2093e5 util/codec, types: add new method to get comparable hash key from MyDecimal (#8930) 2019-01-11 11:01:15 +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
5baedaa21c expression, types: fix some corner case when parsing string to datetime (#7701) 2018-10-08 10:35:52 +08:00
05b37de16e *: use chunk grow for simple executor (#7540) 2018-09-27 09:07:51 +08:00
cb03f2bec1 move from juju/errors to pkg/errors (#7151) 2018-09-12 15:42:20 +08:00
6e7d75299d test: refine test (#7414) 2018-08-16 17:05:59 +08:00
29addca221 stats: log detailed stats info for query feedback (#7293) 2018-08-15 22:01:44 +08:00
e5f26cdeaf types: fix a bug in decimal multiplication (#7208) 2018-07-31 22:15:27 +08:00
fc0ad93356 avoid call errors.Trace when error is nil (#7120) 2018-07-23 10:07:57 +08:00
9cf670a324 *: cut off duration.fsp in chunk (#7043) 2018-07-17 15:36:27 +08:00
dd37138dc0 *: support parallel hash agg (#6658) 2018-06-29 22:59:47 +08:00
d2799801ae test: fix leak test (#6822)
make sure close dom/store in all test.
2018-06-12 17:14:22 +08:00
b812cb517e expression, util: DecodeDecimal return real precision and frac (#6732) 2018-06-08 15:37:32 +08:00
8a326cae76 expression, util: handle err instead of panic in EncodeDecimal (#6758) 2018-06-05 19:38:30 +08:00
5c2d21eab4 *: remove function "NewChunk" (#6524) 2018-05-14 13:43:19 +08:00
c398110154 *: improve performance of DecodeBytes in DecodeOneToChunk (#6135) 2018-03-29 19:11:44 +08:00
9ca8689582 types: handle truncate error in BinaryLiteral.ToInt (#6163)
Truncate error make be treated as warning, we should handle it in `BinaryLiteral.ToInt`.

And compare BinaryLiteral directly instead of converting to uint64 because that the compare function doesn't have statement context.
2018-03-28 14:44:53 +08:00
45dc066401 codec: improve the performance of decoding decimal (#5921) 2018-02-28 20:21:31 +08:00
4dd1fc208d codec, expression: support encoding a Chunk row (#5578) 2018-01-11 20:29:31 +08:00
5db9ac2506 types,util/chunk: refactor Time for Chunk. (#5571) 2018-01-09 10:12:27 +08:00
ecbd60c3ff *: add arguement StatementContext to Encode functions. (#5566) 2018-01-06 17:31:08 +08:00
8b149c3323 Prealloc / collides with package name (#5560) 2018-01-05 19:15:54 +08:00
970e5b5684 *: replace JSON with BinaryJSON (#5460) 2017-12-21 15:20:17 +08:00
5f468489ab util: add kvencoder package, make transfer sql to key-values be possible. (#5236) 2017-11-29 18:01:31 +08:00
Gin
4d0908736a *: preallocation for slice (#5180)
pre-allocate slice
2017-11-21 20:51:25 -06:00
8b15cb52b7 *: move StatementContext to its own package. (#5177) 2017-11-22 00:11:14 +08:00
a32b8dbcf6 *: use Chunk for TableReader. (#5142) 2017-11-21 10:08:50 +08:00
14ed94132c executor: fix issue #5132, update handle id with some other unique keys report Duplicate keys. (#5138) 2017-11-20 11:06:28 +08:00
66c19def93 util/codec: support decode data to chunk. (#5066) 2017-11-13 18:34:22 +08:00
62433663e5 util/types: change types path (#5007)
* util/types: change types path
2017-11-04 10:37:14 -05:00
67bddaa1ee codec: fix a bug in json decode. (#4949)
Previously after decode a JSON from row, we didn't
advance the index in the bytes. This PR fix this.
2017-10-30 18:12:40 +08:00
51a6e6fc48 *: fix ineffectual assignments #4713 (#4746) 2017-10-11 21:26:03 -05:00
7d2804e43c *: check sc.IgnoreZeroInDate when parsing string or number to date/datetime/timestamp (#4732) 2017-10-10 23:38:53 -05:00
3e1d036336 *: log the caller of "terror.Log()" (#4729) 2017-10-10 11:26:43 +08:00
c2691114b4 *: check errors part 2 (#4704) 2017-10-09 12:46:45 +08:00
6f84392d40 *: optimize SortExec (#4622)
* *: change key of orderByRow from "key []types.Datum" to "key []*types.Datum"

* address comment
2017-09-25 19:50:26 +08:00
fc209cb1df *: rewrite hex and bit literals (#4415) 2017-09-07 16:28:24 +08:00
f3134bede9 codec: use reference instead of value copy of "[]types.Datum" (#4408) 2017-09-04 11:30:47 +08:00
c844ad7cea *: fix two error shade bug. (#3910)
* fix a json decode bug.
2017-07-27 02:40:21 -05:00
fc9d5eb215 executor, codec: fix bug when join 2 decimal keys. (#3797) 2017-07-19 11:42:17 +08:00
466e48c3de executor, util: fix bug when the join's keys have different types. (#3784) 2017-07-18 16:28:08 +08:00
d925b59702 codec: let it panic when we try to encode a unspecified decimal. (#3695) 2017-07-14 23:29:05 +08:00
b9088c26b7 codec: simplify json codec. (#3524) 2017-06-23 14:04:09 +08:00
379914a5af *: fix timestamp column data and index inconsistent involving timezone (#3497) 2017-06-20 15:22:50 +08:00
1e4bf4775c document store: add JSON type and codec. (#3248)
Document store: add JSON type and codec.

The JSON binary representation is same with MySQL 5.7. we prefer
this not bson because 1) bson only supports JSON compound types
but not JSON primitive types, and 2) this representation is better
than bson on random access.

This PR now can support these  statements:
```
CREATE TABLE t (a json_field);
INSERT INTO t (a) values ('{"a": "b"}');
SELECT * FROM t;
```

JSON codec uses MySQL 5.7 compatible format, which doesn't support use JSON field as key or index. We will limit this in tidb later.
2017-05-17 12:00:34 +08:00
5494a54db4 util: correct comments mistake (#3121) 2017-04-25 09:16:50 +08:00
2bac467c0d with some spelling mistakes (#2986) 2017-04-05 10:34:09 +08:00
78f7eab61d *: refactor distsql and executor. (#2942) 2017-03-29 15:20:25 +08:00
4095299e9c *: add comparable varint encoding. (#2236) 2016-12-14 21:26:59 +08:00