Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Here is the test in H2:
SELECT js, js IS JSON "json?", js IS JSON value "json?", js IS JSON SCALAR "scalar?", js IS JSON OBJECT "object?", js IS JSON ARRAY "array?" FROM (VALUES ('123'), ('"abc"'), ('{"a": "b"}'), ('[1,2]'), ('abc'), NULL) foo(js);
+----------+-----+-----+-------+-------+------+ |JS |json?|json?|scalar?|object?|array?| +----------+-----+-----+-------+-------+------+ |123 |true |true |true |false |false | |"abc" |true |true |true |false |false | |{"a": "b"}|true |true |false |true |false | |[1,2] |true |true |false |false |true | |abc |false|false|false |false |false | |null |null |null |null |null |null | +----------+-----+-----+-------+-------+------+
Same SQL in Calcite:
+------------+-------+-------+---------+---------+--------+ | JS | json? | json? | scalar? | object? | array? | +------------+-------+-------+---------+---------+--------+ | "abc" | true | true | true | false | false | | 123 | true | true | true | false | false | | [1,2] | true | true | false | false | true | | abc | false | false | false | false | false | | {"a": "b"} | true | true | false | true | false | | | false | false | false | false | false | +------------+-------+-------+---------+---------+--------+
Attachments
Issue Links
- is related to
-
CALCITE-2266 Implement SQL 2016 JSON functions
- Closed
- links to