mirror of https://github.com/citusdata/citus.git
Add columnar test for json (#4553)
Co-authored-by: Jeff Davis <jefdavi@microsoft.com>pull/4554/head
parent
9b39b25390
commit
0581df23f4
|
@ -66,3 +66,8 @@ CREATE TABLE test_null_values (a int, b int[], c composite_type)
|
|||
COPY test_null_values FROM '@abs_srcdir@/data/null_values.csv' WITH CSV;
|
||||
|
||||
SELECT * FROM test_null_values;
|
||||
|
||||
CREATE TABLE test_json(j json) USING columnar;
|
||||
INSERT INTO test_json SELECT ('{"att": ' || g::text || '}')::json from generate_series(1,1000000) g;
|
||||
SELECT * FROM test_json WHERE (j->'att')::text::int8 > 999990;
|
||||
DROP TABLE test_json;
|
||||
|
|
|
@ -76,3 +76,21 @@ SELECT * FROM test_null_values;
|
|||
| |
|
||||
(2 rows)
|
||||
|
||||
CREATE TABLE test_json(j json) USING columnar;
|
||||
INSERT INTO test_json SELECT ('{"att": ' || g::text || '}')::json from generate_series(1,1000000) g;
|
||||
SELECT * FROM test_json WHERE (j->'att')::text::int8 > 999990;
|
||||
j
|
||||
---------------------------------------------------------------------
|
||||
{"att": 999991}
|
||||
{"att": 999992}
|
||||
{"att": 999993}
|
||||
{"att": 999994}
|
||||
{"att": 999995}
|
||||
{"att": 999996}
|
||||
{"att": 999997}
|
||||
{"att": 999998}
|
||||
{"att": 999999}
|
||||
{"att": 1000000}
|
||||
(10 rows)
|
||||
|
||||
DROP TABLE test_json;
|
||||
|
|
Loading…
Reference in New Issue