mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 17:32:32 +00:00
add order by in sql test
This commit is contained in:
parent
bb7d7add46
commit
4d3b3c3588
@ -32,42 +32,42 @@ CREATE TABLE jsons
|
||||
ENGINE = Memory;
|
||||
INSERT INTO jsons VALUES ('{"a":1}');
|
||||
INSERT INTO jsons VALUES ('a');
|
||||
SELECT simpleJSONHas(json, 'foo') FROM jsons;
|
||||
SELECT simpleJSONHas(json, 'foo') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT simpleJSONHas(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONHas(json, 'a') as res FROM jsons order by res;
|
||||
0
|
||||
1
|
||||
SELECT simpleJSONExtractUInt(json, 'a') as res FROM jsons order by res;
|
||||
0
|
||||
SELECT simpleJSONExtractUInt(json, 'a') FROM jsons;
|
||||
1
|
||||
0
|
||||
SELECT simpleJSONExtractUInt(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractUInt(json, 'not exsits') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT simpleJSONExtractInt(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractInt(json, 'a') as res FROM jsons order by res;
|
||||
0
|
||||
1
|
||||
0
|
||||
SELECT simpleJSONExtractInt(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractInt(json, 'not exsits') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT simpleJSONExtractFloat(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractFloat(json, 'a') as res FROM jsons order by res;
|
||||
0
|
||||
1
|
||||
0
|
||||
SELECT simpleJSONExtractFloat(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractFloat(json, 'not exsits') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT simpleJSONExtractBool(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractBool(json, 'a') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT simpleJSONExtractBool(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractBool(json, 'not exsits') as res FROM jsons order by res;
|
||||
0
|
||||
0
|
||||
SELECT positionUTF8(json, 'a') FROM jsons;
|
||||
SELECT positionUTF8(json, 'a') as res FROM jsons order by res;
|
||||
1
|
||||
3
|
||||
SELECT positionCaseInsensitiveUTF8(json, 'A') as res FROM jsons order by res;
|
||||
1
|
||||
SELECT positionCaseInsensitiveUTF8(json, 'A') FROM jsons;
|
||||
3
|
||||
SELECT positionCaseInsensitive(json, 'A') as res FROM jsons order by res;
|
||||
1
|
||||
SELECT positionCaseInsensitive(json, 'A') FROM jsons;
|
||||
3
|
||||
1
|
||||
|
@ -23,16 +23,16 @@ CREATE TABLE jsons
|
||||
ENGINE = Memory;
|
||||
INSERT INTO jsons VALUES ('{"a":1}');
|
||||
INSERT INTO jsons VALUES ('a');
|
||||
SELECT simpleJSONHas(json, 'foo') FROM jsons;
|
||||
SELECT simpleJSONHas(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractUInt(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractUInt(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractInt(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractInt(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractFloat(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractFloat(json, 'not exsits') FROM jsons;
|
||||
SELECT simpleJSONExtractBool(json, 'a') FROM jsons;
|
||||
SELECT simpleJSONExtractBool(json, 'not exsits') FROM jsons;
|
||||
SELECT positionUTF8(json, 'a') FROM jsons;
|
||||
SELECT positionCaseInsensitiveUTF8(json, 'A') FROM jsons;
|
||||
SELECT positionCaseInsensitive(json, 'A') FROM jsons;
|
||||
SELECT simpleJSONHas(json, 'foo') as res FROM jsons order by res;
|
||||
SELECT simpleJSONHas(json, 'a') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractUInt(json, 'a') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractUInt(json, 'not exsits') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractInt(json, 'a') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractInt(json, 'not exsits') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractFloat(json, 'a') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractFloat(json, 'not exsits') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractBool(json, 'a') as res FROM jsons order by res;
|
||||
SELECT simpleJSONExtractBool(json, 'not exsits') as res FROM jsons order by res;
|
||||
SELECT positionUTF8(json, 'a') as res FROM jsons order by res;
|
||||
SELECT positionCaseInsensitiveUTF8(json, 'A') as res FROM jsons order by res;
|
||||
SELECT positionCaseInsensitive(json, 'A') as res FROM jsons order by res;
|
||||
|
Loading…
Reference in New Issue
Block a user