Commit Graph

47 Commits

Author SHA1 Message Date
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
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
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
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
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
43102df978 util/time: ToPackedUint would return error for invalid timestamp (#2190)
month=0 or day=0 is invalid in timestamp such as 2016-00-00 00:00:00
so ToPackedUint should return error, for those cases.
2016-12-12 18:50:16 +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
558ba06368 decode with value size (#1641)
Add size parameter for Decode to reduce slice growth
BenchmarkDecodeWithSize-8 300000 6153 ns/op
BenchmarkDecodeWithOutSize-8 200000 11934 ns/op
2016-08-26 10:44:03 +08:00
e31b281ee7 *: use new MyDecimal implementation. (#1611) 2016-08-22 20:24:39 +08:00
39e4d52bd7 *: support index where and aggregate push down. (#1567) 2016-08-15 20:03:52 +08:00
1d5fdbfaf9 *: improve time codec. (#1551) 2016-08-05 14:23:38 +08:00
212ba73b4a util/codec: encode int64 to varint if not comparable (#1448) 2016-07-25 12:52:06 +08:00
cad94acb54 Store row data in single kv pair (#1347) 2016-06-28 11:15:09 +08:00
cf6d1f5f97 *: do not set null column value to save storage space. (#1236) 2016-05-17 19:14:28 +08:00
0157bcddc1 executor: add XAPI executor. 2016-03-25 10:21:59 +08:00
1662e7ed68 xapi: add xapi functions. 2016-03-23 17:29:05 +08:00
449b34f24b *: replace interface{} with Datum in codec. 2016-03-04 12:54:34 +08:00
a66bc590bc util/codec: remove stringFlag 2015-12-11 12:47:20 +08:00
c5480f2bb9 util/codec: use passed-in buffer in encode functions 2015-12-10 20:22:44 +08:00
ef71bb7e2a util/codec: address comments 2015-12-10 17:25:33 +08:00
9b4f43e62f util/codec: add varint and compactBytes 2015-12-10 15:17:44 +08:00
82b9b4c499 kv: remove kv.encoder, use codec directly 2015-12-10 11:13:05 +08:00
8f0ff0c1fc util: update key codec. 2015-12-08 10:25:19 +08:00
689d47c7ed *: tiny refactor encode/decode key. 2015-12-08 00:06:22 +08:00
29369dba8f *: Rename mysqldef to mysql 2015-10-19 16:26:43 +08:00
408ed6f1a9 codec: support set type 2015-09-25 16:24:01 +08:00
1eb3144cad codec: support enum type codec 2015-09-24 10:56:20 +08:00
5aab3ac504 codec: encode hex/bit to int/uint 2015-09-21 08:02:49 +08:00
1b1de4ba69 util/codec: update decimal codec. 2015-09-10 13:31:55 +08:00
eb2849ef49 util/codec: move decimal codec to util/codec/decimal. 2015-09-10 12:14:25 +08:00
84de0ba2fb codec, mysqldef: add decimal codec support.
support decimal type index.
2015-09-09 18:30:36 +08:00
9d86c72f6a Address comment 2015-09-08 15:12:42 +08:00
d74f03c6a8 codec: support mysql Duration codec 2015-09-08 15:01:22 +08:00
0d6f270068 Add files 2015-09-06 12:08:47 +08:00