Skip to content

Commit

Permalink
disable last few cases
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Feb 25, 2023
1 parent 0043e3e commit db95a84
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
23 changes: 23 additions & 0 deletions e2e_test/batch/types/jsonb.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,26 @@ select jsonb_array_length('null');

statement ok
drop table t;

# Tests moved from regress tests due to not matching exactly.

# PostgreSQL sorts shorter key "two" before longer key "three"
query T
SELECT '{
"one": 1,
"two":"two",
"three":
true}'::jsonb; -- OK
----
{"one": 1, "three": true, "two": "two"}

# We do not support jsonb IS NULL yet.
query TTTT
SELECT
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'ff',
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'qq',
-- ('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'Y') IS NULL AS f,
('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb ->> 'Y') IS NULL AS t,
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'x';
----
{"a": 12, "b": 16} 123 t [1, 2]
22 changes: 11 additions & 11 deletions src/tests/regress/data/sql/jsonb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ SELECT ''::jsonb; -- ERROR, no value
SELECT ' '::jsonb; -- ERROR, no value

-- Multi-line JSON input to check ERROR reporting
SELECT '{
"one": 1,
"two":"two",
"three":
true}'::jsonb; -- OK
--@ SELECT '{
--@ "one": 1,
--@ "two":"two",
--@ "three":
--@ true}'::jsonb; -- OK
SELECT '{
"one": 1,
"two":,"two", -- ERROR extraneous comma before field "two"
Expand Down Expand Up @@ -933,12 +933,12 @@ SELECT '{"aa":["a","aaa"],"qq":{"a":"12","b":"16","c":["c1","c2"],"d":{"d1":"d1"
SELECT '{"aa":["a","aaa"],"qq":{"a":"12","b":"16","c":["c1","c2",["c3"],{"c4":4}],"d":{"d1":"d1","d2":"d2"}}}'::jsonb;
SELECT '{"ff":["a","aaa"]}'::jsonb;

SELECT
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'ff',
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'qq',
('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'Y') IS NULL AS f,
('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb ->> 'Y') IS NULL AS t,
'{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'x';
--@ SELECT
--@ '{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'ff',
--@ '{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'qq',
--@ ('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'Y') IS NULL AS f,
--@ ('{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb ->> 'Y') IS NULL AS t,
--@ '{"ff":{"a":12,"b":16},"qq":123,"x":[1,2],"Y":null}'::jsonb -> 'x';

-- nested containment
--@ SELECT '{"a":[1,2],"c":"b"}'::jsonb @> '{"a":[1,2]}';
Expand Down

0 comments on commit db95a84

Please sign in to comment.