Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions regression-test/data/jsonb_p0/test_jsonb_cast.out
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !select_1 --
1 \N
2 ["{\\'x\\':\\'{"y":1}\\', \\'t\\':\\'{"y":2}\\'}", "{"x":1}"]
3 ["foo\\'bar', 'foo"bar', 'foo\\\\'bar', 'foo\\'\\'bar"]
4 ["\\/some\\/cool\\/url", "/some/cool/url", "a\\\\_\\\\c\\\\l\\\\i\\\\c\\\\k\\\\h\\\\o\\\\u\\\\s\\\\e"]
2 ["{'x':'{"y":1}', 't':'{"y":2}'}", "{"x":1}"]
3 ["foo'bar', 'foo"bar', 'foo\\'bar', 'foo''bar"]
4 ["/some/cool/url", "/some/cool/url", "a\\_\\c\\l\\i\\c\\k\\h\\o\\u\\s\\e"]

-- !select_2 --
1 \N
2 ["{\\'x\\':\\'{"y":1}\\', \\'t\\':\\'{"y":2}\\'}", "{"x":1}"]
3 ["foo\\'bar', 'foo"bar', 'foo\\\\'bar', 'foo\\'\\'bar"]
4 ["\\/some\\/cool\\/url", "/some/cool/url", "a\\\\_\\\\c\\\\l\\\\i\\\\c\\\\k\\\\h\\\\o\\\\u\\\\s\\\\e"]
2 ["{'x':'{"y":1}', 't':'{"y":2}'}", "{"x":1}"]
3 ["foo'bar', 'foo"bar', 'foo\\'bar', 'foo''bar"]
4 ["/some/cool/url", "/some/cool/url", "a\\_\\c\\l\\i\\c\\k\\h\\o\\u\\s\\e"]
27 ["{"k1":"v1", "k2":200}"]
28 ["{"a.b.c":{"k1.a1":"v31", "k2":300},"a":"niu"}"]
29 [" \n\r", " \n\r"]
30 ["f\r\n", "f\r\n""]

-- !select_json --
1 \N
2 ["{\\\\'x\\\\':\\\\'{\\"y\\":1}\\\\', \\\\'t\\\\':\\\\'{\\"y\\":2}\\\\'}","{\\"x\\":1}"]
3 ["foo\\\\'bar', 'foo\\"bar', 'foo\\\\\\\\'bar', 'foo\\\\'\\\\'bar"]
4 ["\\\\/some\\\\/cool\\\\/url","/some/cool/url","a\\\\\\\\_\\\\\\\\c\\\\\\\\l\\\\\\\\i\\\\\\\\c\\\\\\\\k\\\\\\\\h\\\\\\\\o\\\\\\\\u\\\\\\\\s\\\\\\\\e"]
2 ["{'x':'{\\"y\\":1}', 't':'{\\"y\\":2}'}","{\\"x\\":1}"]
3 ["foo'bar', 'foo\\"bar', 'foo\\\\'bar', 'foo''bar"]
4 ["/some/cool/url","/some/cool/url","a\\\\_\\\\c\\\\l\\\\i\\\\c\\\\k\\\\h\\\\o\\\\u\\\\s\\\\e"]
27 ["{\\"k1\\":\\"v1\\", \\"k2\\":200}"]
28 ["{\\"a.b.c\\":{\\"k1.a1\\":\\"v31\\", \\"k2\\":300},\\"a\\":\\"niu\\"}"]
29 ["\\f\\n\\r","\\f\\n\\r"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,8 +544,8 @@ suite("test_jsonb_load_and_function", "p0") {
qt_select """SELECT id, j, JSON_EXTRACT(j, '\$.a1[0].k1', '\$.a1[0].k2', '\$.a1[2]') FROM ${testTable} ORDER BY id"""

// explode_json_object function
qt_order_select_explode_json_object "select id, j, k,v from ${testTable} lateral view explode_json_object_outer(j) tmp as k,v order by id, k;"
qt_order_select_explode_json_object_out "select id, j, k,v from ${testTable} lateral view explode_json_object_outer(j) tmp as k,v order by id, k;"
order_qt_select_explode_json_object "select id, j, k,v from ${testTable} lateral view explode_json_object_outer(j) tmp as k,v order by id, k;"
order_qt_select_explode_json_object_out "select id, j, k,v from ${testTable} lateral view explode_json_object_outer(j) tmp as k,v order by id, k;"

// json_parse
qt_sql_json_parse """SELECT/*+SET_VAR(enable_fold_constant_by_be=false)*/ json_parse('{"":"v1"}')"""
Expand Down