ClickHouse/tests/queries/0_stateless/00918_json_functions.reference
2022-12-13 12:48:14 +01:00

257 lines
3.9 KiB
Plaintext

--allow_simdjson=1--
--JSONLength--
2
3
0
--JSONHas--
1
1
0
--isValidJSON--
1
0
0
--JSONKey--
a
b
b
a
--JSONType--
Object
Array
--JSONExtract<numeric>--
-100
200
300
1
0
--JSONExtractString--
hello
hello
\n\0
--JSONExtract (generic)--
('hello',[-100,200,300])
('hello',[-100,200,300])
([-100,200,300],'hello')
('hello\0',0)
hello
[-100,200,300]
(-100,200,300)
[-100,0,0]
[-100,NULL,NULL]
[0,200,0]
[NULL,200,NULL]
-100
200
\N
1
Thursday
Friday
(3,5)
(7,3)
(5,0)
(3,5)
(3,0)
(3,5)
(3,0)
(123456,3.55)
(1,'417ddc5d-e556-4d27-95dd-a34d84e46a50')
hello
(3333.6,'test')
(3333.6,'test')
(3333.6333333333,'test')
(3333.6333333333,'test')
123456.1234 Decimal(20, 4)
123456.1234 Decimal(20, 4)
123456789012345.12 Decimal(30, 4)
(1234567890.1234567890123456789,'test') Tuple(a Decimal(35, 20), b LowCardinality(String))
(1234567890.12345678901234567890123456789,'test') Tuple(a Decimal(45, 30), b LowCardinality(String))
123456789012345.1136 123456789012345.1136
1234567890.12345677879616925706 (1234567890.12345677879616925706,'test')
1234567890.123456695758468374595199311875 (1234567890.123456695758468374595199311875,'test')
-1234567890 Int32
1234567890 UInt32
-1234567890123456789 Int64
1234567890123456789 UInt64
-1234567890123456789 Int128
1234567890123456789 UInt128
-1234567890123456789 Int256
1234567890123456789 UInt256
-123456789 Int32
123456789 UInt32
-123456789012 Int64
123456789012 UInt64
-123456789012 Int128
123456789012 UInt128
-123456789012 Int256
123456789012 UInt256
-123456789 Int32
123456789 UInt32
-1234567890123456789 Int64
1234567890123456789 UInt64
-12345678901234567890123456789012345678 Int128
12345678901234567890123456789012345678 UInt128
-11345678901234567890123456789012345678901234567890123456789012345678901234567 Int256
11345678901234567890123456789012345678901234567890123456789012345678901234567 UInt256
0 Int32
0 UInt32
0 Int64
0 UInt64
false Bool
true Bool
--JSONExtractKeysAndValues--
[('a','hello'),('b','[-100,200,300]')]
[('b',[-100,200,300])]
[('a','hello'),('b','world')]
[('a',5),('b',7),('c',11)]
[('a','hello'),('b','world')]
--JSONExtractRaw--
{"a":"hello","b":[-100,200,300]}
"hello"
[-100,200,300]
-100
{"a":"hello","b":[-100,200,300],"c":{"d":[121,144]}}
{"d":[121,144]}
[121,144]
144
{"passed":true}
{}
"\\n\\u0000"
"☺"
--JSONExtractArrayRaw--
[]
[]
[]
['[]','[]']
['-100','200','300']
['1','2','3','4','5','"hello"']
['1','2','3']
['4','5','6']
--JSONExtractKeysAndValuesRaw--
[]
[]
[('a','"hello"'),('b','[-100,200,300]')]
[('a','"hello"'),('b','[-100,200,300]'),('c','{"d":[121,144]}')]
[('d','[121,144]')]
--const/non-const mixed--
a
b
c
d
e
u
v
--show error: type should be const string
--allow_simdjson=0--
--JSONLength--
2
3
0
--JSONHas--
1
1
0
--isValidJSON--
1
0
0
--JSONKey--
a
b
b
a
--JSONType--
Object
Array
--JSONExtract<numeric>--
-100
200
300
1
0
--JSONExtractString--
hello
hello
\n\0
--JSONExtract (generic)--
('hello',[-100,200,300])
('hello',[-100,200,300])
([-100,200,300],'hello')
('hello\0',0)
hello
[-100,200,300]
(-100,200,300)
[-100,0,0]
[-100,NULL,NULL]
[0,200,0]
[NULL,200,NULL]
-100
200
\N
1
Thursday
Friday
(3,5)
(7,3)
(5,0)
(3,5)
(3,0)
(3,5)
(3,0)
--JSONExtractKeysAndValues--
[('a','hello'),('b','[-100,200,300]')]
[('b',[-100,200,300])]
[('a','hello'),('b','world')]
[('a',5),('b',7),('c',11)]
--JSONExtractRaw--
{"a":"hello","b":[-100,200,300]}
"hello"
[-100,200,300]
-100
{"a":"hello","b":[-100,200,300],"c":{"d":[121,144]}}
{"d":[121,144]}
[121,144]
144
{"passed":true}
{}
"\\n\\u0000"
"☺"
--JSONExtractArrayRaw--
[]
[]
[]
['[]','[]']
['-100','200','300']
['1','2','3','4','5','"hello"']
['1','2','3']
['4','5','6']
--JSONExtractKeysAndValuesRaw--
[]
[]
[('a','"hello"'),('b','[-100,200,300]')]
[('a','"hello"'),('b','[-100,200,300]'),('c','{"d":[121,144]}')]
[('d','[121,144]')]
--JSONExtractKeys--
['a','b']
[]
[]
['d']
--const/non-const mixed--
a
b
c
d
e
u
v
--show error: type should be const string
--show error: index type should be integer