Tests: Convert error numbers to symbolic error codes

This commit is contained in:
Robert Schulze 2024-05-31 08:44:16 +00:00
parent db09d239dc
commit 46b3266377
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
32 changed files with 113 additions and 113 deletions

View File

@ -12,6 +12,6 @@ INSERT INTO cast_enums SELECT 2 AS type, toDate('2017-01-01') AS date, number AS
SELECT type, date, id FROM cast_enums ORDER BY type, id;
INSERT INTO cast_enums VALUES ('wrong_value', '2017-01-02', 7); -- { clientError 691 }
INSERT INTO cast_enums VALUES ('wrong_value', '2017-01-02', 7); -- { clientError UNKNOWN_ELEMENT_OF_ENUM }
DROP TABLE IF EXISTS cast_enums;

View File

@ -18,26 +18,26 @@ CREATE TABLE IF NOT EXISTS decimal
j DECIMAL(1,0)
) ENGINE = Memory;
INSERT INTO decimal (a) VALUES (1000000000); -- { clientError 69 }
INSERT INTO decimal (a) VALUES (-1000000000); -- { clientError 69 }
INSERT INTO decimal (b) VALUES (1000000000000000000); -- { clientError 69 }
INSERT INTO decimal (b) VALUES (-1000000000000000000); -- { clientError 69 }
INSERT INTO decimal (c) VALUES (100000000000000000000000000000000000000); -- { clientError 69 }
INSERT INTO decimal (c) VALUES (-100000000000000000000000000000000000000); -- { clientError 69 }
INSERT INTO decimal (d) VALUES (1); -- { clientError 69 }
INSERT INTO decimal (d) VALUES (-1); -- { clientError 69 }
INSERT INTO decimal (e) VALUES (1000000000000000000); -- { clientError 69 }
INSERT INTO decimal (e) VALUES (-1000000000000000000); -- { clientError 69 }
INSERT INTO decimal (f) VALUES (1); -- { clientError 69 }
INSERT INTO decimal (f) VALUES (-1); -- { clientError 69 }
INSERT INTO decimal (g) VALUES (10000); -- { clientError 69 }
INSERT INTO decimal (g) VALUES (-10000); -- { clientError 69 }
INSERT INTO decimal (h) VALUES (1000000000); -- { clientError 69 }
INSERT INTO decimal (h) VALUES (-1000000000); -- { clientError 69 }
INSERT INTO decimal (i) VALUES (100000000000000000000); -- { clientError 69 }
INSERT INTO decimal (i) VALUES (-100000000000000000000); -- { clientError 69 }
INSERT INTO decimal (j) VALUES (10); -- { clientError 69 }
INSERT INTO decimal (j) VALUES (-10); -- { clientError 69 }
INSERT INTO decimal (a) VALUES (1000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (a) VALUES (-1000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (b) VALUES (1000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (b) VALUES (-1000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (c) VALUES (100000000000000000000000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (c) VALUES (-100000000000000000000000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (d) VALUES (1); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (d) VALUES (-1); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (e) VALUES (1000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (e) VALUES (-1000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (f) VALUES (1); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (f) VALUES (-1); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (g) VALUES (10000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (g) VALUES (-10000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (h) VALUES (1000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (h) VALUES (-1000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (i) VALUES (100000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (i) VALUES (-100000000000000000000); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (j) VALUES (10); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (j) VALUES (-10); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (a) VALUES (0.1);
INSERT INTO decimal (a) VALUES (-0.1);
@ -84,14 +84,14 @@ INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j) VALUES (0.0, 0.0, 0.0, 0.0, 0
INSERT INTO decimal (a, b, c, d, e, f, g, h, i, j) VALUES (-0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0);
INSERT INTO decimal (a, b, g) VALUES ('42.00000', 42.0000000000000000000000000000000, '0.999990');
INSERT INTO decimal (a) VALUES ('-9x'); -- { clientError 6 }
INSERT INTO decimal (a) VALUES ('0x1'); -- { clientError 6 }
INSERT INTO decimal (a) VALUES ('-9x'); -- { clientError CANNOT_PARSE_TEXT }
INSERT INTO decimal (a) VALUES ('0x1'); -- { clientError CANNOT_PARSE_TEXT }
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('0.9e9', '0.9e18', '0.9e38', '9e-9', '9e-18', '9e-38');
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-0.9e9', '-0.9e18', '-0.9e38', '-9e-9', '-9e-18', '-9e-38');
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('1e9', '1e18', '1e38', '1e-10', '1e-19', '1e-39'); -- { clientError 69 }
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-1e9', '-1e18', '-1e38', '-1e-10', '-1e-19', '-1e-39'); -- { clientError 69 }
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('1e9', '1e18', '1e38', '1e-10', '1e-19', '1e-39'); -- { clientError ARGUMENT_OUT_OF_BOUND }
INSERT INTO decimal (a, b, c, d, e, f) VALUES ('-1e9', '-1e18', '-1e38', '-1e-10', '-1e-19', '-1e-39'); -- { clientError ARGUMENT_OUT_OF_BOUND }
SELECT * FROM decimal ORDER BY a, b, c, d, e, f, g, h, i, j;
DROP TABLE IF EXISTS decimal;

View File

@ -5,7 +5,7 @@ set input_format_null_as_default=0;
CREATE TABLE arraytest ( created_date Date DEFAULT toDate(created_at), created_at DateTime DEFAULT now(), strings Array(String) DEFAULT emptyArrayString()) ENGINE = MergeTree(created_date, cityHash64(created_at), (created_date, cityHash64(created_at)), 8192);
INSERT INTO arraytest (created_at, strings) VALUES (now(), ['aaaaa', 'bbbbb', 'ccccc']);
INSERT INTO arraytest (created_at, strings) VALUES (now(), ['aaaaa', 'bbbbb', null]); -- { clientError 349 }
INSERT INTO arraytest (created_at, strings) VALUES (now(), ['aaaaa', 'bbbbb', null]); -- { clientError CANNOT_INSERT_NULL_IN_ORDINARY_COLUMN }
SELECT strings from arraytest;

View File

@ -23,9 +23,9 @@ INSERT INTO values_template VALUES ((1), lower(replaceAll('Hella', 'a', 'o')), 1
INSERT INTO values_template_nullable VALUES ((1), lower(replaceAll('Hella', 'a', 'o')), 1 + 2 + 3, arraySort(x -> assumeNotNull(x), [null, NULL::Nullable(UInt8)])), ((2), lower(replaceAll('Warld', 'b', 'o')), 4 - 5 + 6, arraySort(x -> assumeNotNull(x), [+1, -1, Null])), ((3), lower(replaceAll('Test', 'c', 'o')), 3 + 2 - 1, arraySort(x -> assumeNotNull(x), [1, nUlL, 3.14])), ((4), lower(replaceAll(null, 'c', 'o')), 6 + 5 - null, arraySort(x -> assumeNotNull(x), [3, 2, 1]));
INSERT INTO values_template_fallback VALUES (1 + x); -- { clientError 62 }
INSERT INTO values_template_fallback VALUES (abs(functionThatDoesNotExists(42))); -- { clientError 46 }
INSERT INTO values_template_fallback VALUES ([1]); -- { clientError 43 }
INSERT INTO values_template_fallback VALUES (1 + x); -- { clientError SYNTAX_ERROR }
INSERT INTO values_template_fallback VALUES (abs(functionThatDoesNotExists(42))); -- { clientError UNKNOWN_FUNCTION }
INSERT INTO values_template_fallback VALUES ([1]); -- { clientError ILLEGAL_TYPE_OF_ARGUMENT }
INSERT INTO values_template_fallback VALUES (CAST(1, 'UInt8')), (CAST('2', 'UInt8'));
SET input_format_values_accurate_types_of_literals = 0;

View File

@ -1,2 +1,2 @@
select 1 format Template settings format_template_row='01070_nonexistent_file.txt'; -- { clientError 107 }
select 1 format Template settings format_template_row='/dev/null'; -- { clientError 474 }
select 1 format Template settings format_template_row='01070_nonexistent_file.txt'; -- { clientError FILE_DOESNT_EXIST }
select 1 format Template settings format_template_row='/dev/null'; -- { clientError INVALID_TEMPLATE_FORMAT }

View File

@ -4,7 +4,7 @@ create table rmt1 (d DateTime, n int) engine=ReplicatedMergeTree('/test/01165/{d
create table rmt2 (d DateTime, n int) engine=ReplicatedMergeTree('/test/01165/{database}/rmt', '2') order by n partition by toYYYYMMDD(d);
system stop replicated sends rmt1;
insert into rmt1 values (now(), arrayJoin([1, 2])); -- { clientError 36 }
insert into rmt1 values (now(), arrayJoin([1, 2])); -- { clientError BAD_ARGUMENTS }
insert into rmt1(n) select * from system.numbers limit arrayJoin([1, 2]); -- { serverError BAD_ARGUMENTS, INVALID_LIMIT_EXPRESSION }
insert into rmt1 values (now(), rand());
drop table rmt1;

View File

@ -54,7 +54,7 @@ begin transaction;
insert into mt1 values (6);
insert into mt2 values (60);
select 'on session close', arraySort(groupArray(n)) from (select n from mt1 union all select * from mt2);
insert into mt1 values ([1]); -- { clientError 43 }
insert into mt1 values ([1]); -- { clientError ILLEGAL_TYPE_OF_ARGUMENT }
-- INSERT failures does not produce client reconnect anymore, so rollback can be done
rollback;

View File

@ -7,7 +7,7 @@ drop table if exists mt;
attach table test from 'some/path' (n UInt8) engine=Memory; -- { serverError NOT_IMPLEMENTED }
attach table test from '/etc/passwd' (s String) engine=File(TSVRaw); -- { serverError PATH_ACCESS_DENIED }
attach table test from '../../../../../../../../../etc/passwd' (s String) engine=File(TSVRaw); -- { serverError PATH_ACCESS_DENIED }
attach table test from 42 (s String) engine=File(TSVRaw); -- { clientError 62 }
attach table test from 42 (s String) engine=File(TSVRaw); -- { clientError SYNTAX_ERROR }
insert into table function file('01188_attach/file/data.TSV', 'TSV', 's String, n UInt8') values ('file', 42);
attach table file from '01188_attach/file' (s String, n UInt8) engine=File(TSV);

View File

@ -156,8 +156,8 @@ CREATE QUOTA q13_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '12G';
CREATE QUOTA q14_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '12Gi';
CREATE QUOTA q15_01297 FOR INTERVAL 1 MINUTE MAX query_selects = 1.5;
CREATE QUOTA q16_01297 FOR INTERVAL 1 MINUTE MAX execution_time = 1.5;
CREATE QUOTA q17_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1.5'; -- { clientError 27 }
CREATE QUOTA q18_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1.5'; -- { clientError 27 }
CREATE QUOTA q17_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1.5'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q18_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1.5'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
SHOW CREATE QUOTA q1_01297;
SHOW CREATE QUOTA q2_01297;
SHOW CREATE QUOTA q3_01297;
@ -205,8 +205,8 @@ SHOW CREATE QUOTA q2_01297;
DROP QUOTA IF EXISTS q1_01297;
DROP QUOTA IF EXISTS q2_01297;
SELECT '-- underflow test';
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '-1'; -- { clientError 72 }
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '-1'; -- { clientError 72 }
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '-1'; -- { clientError CANNOT_PARSE_NUMBER }
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '-1'; -- { clientError CANNOT_PARSE_NUMBER }
SELECT '-- syntax test';
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = ' 12 ';
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = ' 12 ';
@ -239,11 +239,11 @@ DROP QUOTA IF EXISTS q8_01297;
DROP QUOTA IF EXISTS q9_01297;
DROP QUOTA IF EXISTS q10_01297;
SELECT '-- bad syntax test';
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1 1'; -- { clientError 27 }
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1 1'; -- { clientError 27 }
CREATE QUOTA q3_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1K 1'; -- { clientError 27 }
CREATE QUOTA q4_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1K 1'; -- { clientError 27 }
CREATE QUOTA q5_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1K1'; -- { clientError 27 }
CREATE QUOTA q6_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1K1'; -- { clientError 27 }
CREATE QUOTA q7_01297 FOR INTERVAL 1 MINUTE MAX query_selects = 'foo'; -- { clientError 27 }
CREATE QUOTA q8_01297 FOR INTERVAL 1 MINUTE MAX execution_time = 'bar'; -- { clientError 27 }
CREATE QUOTA q1_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1 1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q2_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1 1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q3_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1K 1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q4_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1K 1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q5_01297 FOR INTERVAL 1 MINUTE MAX query_selects = '1K1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q6_01297 FOR INTERVAL 1 MINUTE MAX execution_time = '1K1'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q7_01297 FOR INTERVAL 1 MINUTE MAX query_selects = 'foo'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }
CREATE QUOTA q8_01297 FOR INTERVAL 1 MINUTE MAX execution_time = 'bar'; -- { clientError CANNOT_PARSE_INPUT_ASSERTION_FAILED }

View File

@ -3,11 +3,11 @@ create table values_01564(
a int,
constraint c1 check a < 10) engine Memory;
-- client error hint after broken insert values
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
select 1;
1
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
select nonexistent column; -- { serverError UNKNOWN_IDENTIFIER }
select 1;
1
@ -25,7 +25,7 @@ select 1;
1
-- a failing insert and then a normal insert (#https://github.com/ClickHouse/ClickHouse/issues/19353)
CREATE TABLE t0 (c0 String, c1 Int32) ENGINE = Memory() ;
INSERT INTO t0(c0, c1) VALUES ("1",1) ; -- { clientError 47 }
INSERT INTO t0(c0, c1) VALUES ("1",1) ; -- { clientError UNKNOWN_IDENTIFIER }
INSERT INTO t0(c0, c1) VALUES ('1', 1) ;
-- the return code must be zero after the final query has failed with expected error
insert into values_01564 values (11); -- { serverError VIOLATED_CONSTRAINT }

View File

@ -4,21 +4,21 @@ create table values_01564(
constraint c1 check a < 10) engine Memory;
-- client error hint after broken insert values
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
select 1;
insert into values_01564 values ('f'); -- { clientError 6 }
insert into values_01564 values ('f'); -- { clientError CANNOT_PARSE_TEXT }
select nonexistent column; -- { serverError UNKNOWN_IDENTIFIER }
-- syntax error hint after broken insert values
insert into values_01564 this is bad syntax values ('f'); -- { clientError 62 }
insert into values_01564 this is bad syntax values ('f'); -- { clientError SYNTAX_ERROR }
insert into values_01564 this is bad syntax values ('f'); -- { clientError 62 }
insert into values_01564 this is bad syntax values ('f'); -- { clientError SYNTAX_ERROR }
select 1;
insert into values_01564 this is bad syntax values ('f'); -- { clientError 62 }
insert into values_01564 this is bad syntax values ('f'); -- { clientError SYNTAX_ERROR }
select nonexistent column; -- { serverError UNKNOWN_IDENTIFIER }
-- server error hint after broken insert values (violated constraint)
@ -37,14 +37,14 @@ insert into values_01564 values (1); select 1;
-- insert into values_01564 values (11) /*{ serverError VIOLATED_CONSTRAINT }*/; select 1;
-- syntax error, where the last token we can parse is long before the semicolon.
select this is too many words for an alias; -- { clientError 62 }
OPTIMIZE TABLE values_01564 DEDUPLICATE BY; -- { clientError 62 }
OPTIMIZE TABLE values_01564 DEDUPLICATE BY a EXCEPT a; -- { clientError 62 }
select 'a' || distinct one || 'c' from system.one; -- { clientError 62 }
select this is too many words for an alias; -- { clientError SYNTAX_ERROR }
OPTIMIZE TABLE values_01564 DEDUPLICATE BY; -- { clientError SYNTAX_ERROR }
OPTIMIZE TABLE values_01564 DEDUPLICATE BY a EXCEPT a; -- { clientError SYNTAX_ERROR }
select 'a' || distinct one || 'c' from system.one; -- { clientError SYNTAX_ERROR }
-- a failing insert and then a normal insert (#https://github.com/ClickHouse/ClickHouse/issues/19353)
CREATE TABLE t0 (c0 String, c1 Int32) ENGINE = Memory() ;
INSERT INTO t0(c0, c1) VALUES ("1",1) ; -- { clientError 47 }
INSERT INTO t0(c0, c1) VALUES ("1",1) ; -- { clientError UNKNOWN_IDENTIFIER }
INSERT INTO t0(c0, c1) VALUES ('1', 1) ;
-- the return code must be zero after the final query has failed with expected error

View File

@ -32,10 +32,10 @@ OPTIMIZE TABLE full_duplicates DEDUPLICATE BY * EXCEPT(pk); -- { serverError THE
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY * EXCEPT(sk); -- { serverError THERE_IS_NO_COLUMN } -- sorting key column is missing [1]
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY * EXCEPT(partition_key); -- { serverError THERE_IS_NO_COLUMN } -- partitioning column is missing [1]
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY; -- { clientError 62 } -- empty list is a syntax error
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk,sk,val,mat EXCEPT mat; -- { clientError 62 } -- invalid syntax
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk APPLY(pk + 1); -- { clientError 62 } -- APPLY column transformer is not supported
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk REPLACE(pk + 1); -- { clientError 62 } -- REPLACE column transformer is not supported
OPTIMIZE TABLE full_duplicates DEDUPLICATE BY; -- { clientError SYNTAX_ERROR } -- empty list is a syntax error
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk,sk,val,mat EXCEPT mat; -- { clientError SYNTAX_ERROR } -- invalid syntax
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk APPLY(pk + 1); -- { clientError SYNTAX_ERROR } -- APPLY column transformer is not supported
OPTIMIZE TABLE partial_duplicates DEDUPLICATE BY pk REPLACE(pk + 1); -- { clientError SYNTAX_ERROR } -- REPLACE column transformer is not supported
-- Valid cases
-- NOTE: here and below we need FINAL to force deduplication in such a small set of data in only 1 part.

View File

@ -28,13 +28,13 @@ SHOW CREATE VIEW test_1602.tbl; -- { serverError BAD_ARGUMENTS }
SHOW CREATE TEMPORARY VIEW; -- { serverError UNKNOWN_TABLE }
SHOW CREATE VIEW; -- { clientError 62 }
SHOW CREATE VIEW; -- { clientError SYNTAX_ERROR }
SHOW CREATE DATABASE; -- { clientError 62 }
SHOW CREATE DATABASE; -- { clientError SYNTAX_ERROR }
SHOW CREATE DICTIONARY; -- { clientError 62 }
SHOW CREATE DICTIONARY; -- { clientError SYNTAX_ERROR }
SHOW CREATE TABLE; -- { clientError 62 }
SHOW CREATE TABLE; -- { clientError SYNTAX_ERROR }
SHOW CREATE test_1602.VIEW;

View File

@ -1,3 +1,3 @@
explain ast; -- { clientError 62 }
explain ast; -- { clientError SYNTAX_ERROR }
explain ast alter table t1 delete where date = today();
explain ast create function double AS (n) -> 2*n;

View File

@ -1,3 +1,3 @@
SELECT view(SELECT 1); -- { clientError 62 }
SELECT view(SELECT 1); -- { clientError SYNTAX_ERROR }
SELECT sumIf(dummy, dummy) FROM remote('127.0.0.{1,2}', numbers(2, 100), view(SELECT CAST(NULL, 'Nullable(UInt8)') AS dummy FROM system.one)); -- { serverError UNKNOWN_FUNCTION }

View File

@ -8,7 +8,7 @@ INSERT INTO test_tuple VALUES ((NULL, 1));
SELECT * FROM test_tuple;
SET input_format_null_as_default = 0;
INSERT INTO test_tuple VALUES ((NULL, 2)); -- { clientError 53 }
INSERT INTO test_tuple VALUES ((NULL, 2)); -- { clientError TYPE_MISMATCH }
SELECT * FROM test_tuple;
DROP TABLE test_tuple;
@ -23,7 +23,7 @@ INSERT INTO test_tuple_nested_in_array VALUES ([(NULL, 2), (3, NULL), (NULL, 4)]
SELECT * FROM test_tuple_nested_in_array;
SET input_format_null_as_default = 0;
INSERT INTO test_tuple_nested_in_array VALUES ([(NULL, 1)]); -- { clientError 53 }
INSERT INTO test_tuple_nested_in_array VALUES ([(NULL, 1)]); -- { clientError TYPE_MISMATCH }
SELECT * FROM test_tuple_nested_in_array;
DROP TABLE test_tuple_nested_in_array;
@ -38,7 +38,7 @@ INSERT INTO test_tuple_nested_in_array_nested_in_tuple VALUES ( (NULL, [(NULL, 2
SELECT * FROM test_tuple_nested_in_array_nested_in_tuple;
SET input_format_null_as_default = 0;
INSERT INTO test_tuple_nested_in_array_nested_in_tuple VALUES ( (NULL, [(NULL, 1)]) ); -- { clientError 53 }
INSERT INTO test_tuple_nested_in_array_nested_in_tuple VALUES ( (NULL, [(NULL, 1)]) ); -- { clientError TYPE_MISMATCH }
SELECT * FROM test_tuple_nested_in_array_nested_in_tuple;
DROP TABLE test_tuple_nested_in_array_nested_in_tuple;
@ -56,7 +56,7 @@ INSERT INTO test_tuple_nested_in_map VALUES (map('test', (NULL, 1)));
SELECT * FROM test_tuple_nested_in_map;
SET input_format_null_as_default = 0;
INSERT INTO test_tuple_nested_in_map VALUES (map('test', (NULL, 1))); -- { clientError 53 }
INSERT INTO test_tuple_nested_in_map VALUES (map('test', (NULL, 1))); -- { clientError TYPE_MISMATCH }
SELECT * FROM test_tuple_nested_in_map;
DROP TABLE test_tuple_nested_in_map;
@ -71,7 +71,7 @@ INSERT INTO test_tuple_nested_in_map_nested_in_tuple VALUES ( (NULL, map('test',
SELECT * FROM test_tuple_nested_in_map_nested_in_tuple;
SET input_format_null_as_default = 0;
INSERT INTO test_tuple_nested_in_map_nested_in_tuple VALUES ( (NULL, map('test', (NULL, 1))) ); -- { clientError 53 }
INSERT INTO test_tuple_nested_in_map_nested_in_tuple VALUES ( (NULL, map('test', (NULL, 1))) ); -- { clientError TYPE_MISMATCH }
SELECT * FROM test_tuple_nested_in_map_nested_in_tuple;
DROP TABLE test_tuple_nested_in_map_nested_in_tuple;

View File

@ -22,7 +22,7 @@ INSERT INTO t_json_field VALUES (4, map('a', 30, 'b', 400)), (5, map('s', 'qqq',
SELECT id, data.a, data.s, data.b, data.t FROM t_json_field ORDER BY id;
SELECT DISTINCT toTypeName(data) FROM t_json_field;
INSERT INTO t_json_field VALUES (6, map(1, 2, 3, 4)); -- { clientError 53 }
INSERT INTO t_json_field VALUES (6, (1, 2, 3)); -- { clientError 53 }
INSERT INTO t_json_field VALUES (6, map(1, 2, 3, 4)); -- { clientError TYPE_MISMATCH }
INSERT INTO t_json_field VALUES (6, (1, 2, 3)); -- { clientError TYPE_MISMATCH }
DROP TABLE t_json_field;

View File

@ -8,16 +8,16 @@ SELECT DISTINCT ON (a, b) * FROM t1;
SELECT DISTINCT ON (a) * FROM t1;
-- fuzzer will fail, enable when fixed
-- SELECT DISTINCT ON (a, b) a, b, c FROM t1 LIMIT 1 BY a, b; -- { clientError 62 }
-- SELECT DISTINCT ON (a, b) a, b, c FROM t1 LIMIT 1 BY a, b; -- { clientError SYNTAX_ERROR }
-- SELECT DISTINCT ON a, b a, b FROM t1; -- { clientError 62 }
-- SELECT DISTINCT ON a a, b FROM t1; -- { clientError 62 }
-- SELECT DISTINCT ON a, b a, b FROM t1; -- { clientError SYNTAX_ERROR }
-- SELECT DISTINCT ON a a, b FROM t1; -- { clientError SYNTAX_ERROR }
-- "Code: 47. DB::Exception: Missing columns: 'DISTINCT'" - error can be better
-- SELECT DISTINCT ON (a, b) DISTINCT a, b FROM t1; -- { serverError UNKNOWN_IDENTIFIER }
-- SELECT DISTINCT DISTINCT ON (a, b) a, b FROM t1; -- { clientError 62 }
-- SELECT DISTINCT DISTINCT ON (a, b) a, b FROM t1; -- { clientError SYNTAX_ERROR }
-- SELECT ALL DISTINCT ON (a, b) a, b FROM t1; -- { clientError 62 }
-- SELECT DISTINCT ON (a, b) ALL a, b FROM t1; -- { clientError 62 }
-- SELECT ALL DISTINCT ON (a, b) a, b FROM t1; -- { clientError SYNTAX_ERROR }
-- SELECT DISTINCT ON (a, b) ALL a, b FROM t1; -- { clientError SYNTAX_ERROR }
DROP TABLE IF EXISTS t1;

View File

@ -5,5 +5,5 @@ ALTER TABLE alter_column_02126 ALTER COLUMN x TYPE Float32;
SHOW CREATE TABLE alter_column_02126;
ALTER TABLE alter_column_02126 ALTER COLUMN x TYPE Float64, MODIFY COLUMN y Float32;
SHOW CREATE TABLE alter_column_02126;
ALTER TABLE alter_column_02126 MODIFY COLUMN y TYPE Float32; -- { clientError 62 }
ALTER TABLE alter_column_02126 ALTER COLUMN y Float32; -- { clientError 62 }
ALTER TABLE alter_column_02126 MODIFY COLUMN y TYPE Float32; -- { clientError SYNTAX_ERROR }
ALTER TABLE alter_column_02126 ALTER COLUMN y Float32; -- { clientError SYNTAX_ERROR }

View File

@ -1,5 +1,5 @@
create table t02155_t64_tz ( a DateTime64(9, America/Chicago)) Engine = Memory; -- { clientError 62 }
create table t02155_t_tz ( a DateTime(America/Chicago)) Engine = Memory; -- { clientError 62 }
create table t02155_t64_tz ( a DateTime64(9, America/Chicago)) Engine = Memory; -- { clientError SYNTAX_ERROR }
create table t02155_t_tz ( a DateTime(America/Chicago)) Engine = Memory; -- { clientError SYNTAX_ERROR }
create table t02155_t64_tz ( a DateTime64(9, 'America/Chicago')) Engine = Memory;
create table t02155_t_tz ( a DateTime('America/Chicago')) Engine = Memory;

View File

@ -69,9 +69,9 @@ DROP TABLE t2;
CREATE DATABASE test_02184 ORDER BY kek; -- {serverError INCORRECT_QUERY}
CREATE DATABASE test_02184 SETTINGS x=1; -- {serverError UNKNOWN_SETTING}
CREATE TABLE table_02184 (x UInt8, y int, PRIMARY KEY (x)) ENGINE=MergeTree PRIMARY KEY y; -- {clientError 36}
CREATE TABLE table_02184 (x UInt8, y int, PRIMARY KEY (x)) ENGINE=MergeTree PRIMARY KEY y; -- {clientError BAD_ARGUMENTS}
SET default_table_engine = 'MergeTree';
CREATE TABLE table_02184 (x UInt8, y int, PRIMARY KEY (x)) PRIMARY KEY y; -- {clientError 36}
CREATE TABLE table_02184 (x UInt8, y int, PRIMARY KEY (x)) PRIMARY KEY y; -- {clientError BAD_ARGUMENTS}
CREATE TABLE mt (a UInt64, b Nullable(String), PRIMARY KEY (a, coalesce(b, 'test')), INDEX b_index b TYPE set(123) GRANULARITY 1);
SHOW CREATE TABLE mt;

View File

@ -2,7 +2,7 @@ DROP TABLE IF EXISTS t;
CREATE TABLE t (n UInt32) ENGINE=Memory;
INSERT INTO t VALUES; -- { clientError 108 }
INSERT INTO t VALUES; -- { clientError NO_DATA_TO_INSERT }
set throw_if_no_data_to_insert = 0;

View File

@ -1,6 +1,6 @@
SELECT 1 SETTINGS max_execution_time=NaN; -- { clientError 72 }
SELECT 1 SETTINGS max_execution_time=Infinity; -- { clientError 72 };
SELECT 1 SETTINGS max_execution_time=-Infinity; -- { clientError 72 };
SELECT 1 SETTINGS max_execution_time=NaN; -- { clientError CANNOT_PARSE_NUMBER }
SELECT 1 SETTINGS max_execution_time=Infinity; -- { clientError CANNOT_PARSE_NUMBER };
SELECT 1 SETTINGS max_execution_time=-Infinity; -- { clientError CANNOT_PARSE_NUMBER };
-- Ok values
SELECT 1 SETTINGS max_execution_time=-0.5;

View File

@ -54,7 +54,7 @@ Customers | summarize dcount(Education);
Customers | summarize dcountif(Education, Occupation=='Professional');
Customers | summarize count_ = count() by bin(Age, 10) | order by count_ asc;
Customers | summarize job_count = count() by Occupation | where job_count > 0 | order by Occupation;
Customers | summarize 'Edu Count'=count() by Education | sort by 'Edu Count' desc; -- { clientError 62 }
Customers | summarize 'Edu Count'=count() by Education | sort by 'Edu Count' desc; -- { clientError SYNTAX_ERROR }
print '-- make_list() --';
Customers | summarize f_list = make_list(Education) by Occupation | sort by Occupation;

View File

@ -1,9 +1,9 @@
SELECT sum(number number number) FROM numbers(10); -- { clientError 62 }
SELECT sum(number number) FROM numbers(10); -- { clientError 62 }
SELECT sum(number number number) FROM numbers(10); -- { clientError SYNTAX_ERROR }
SELECT sum(number number) FROM numbers(10); -- { clientError SYNTAX_ERROR }
SELECT sum(number AS number) FROM numbers(10);
SELECT [number number number] FROM numbers(1); -- { clientError 62 }
SELECT [number number] FROM numbers(1); -- { clientError 62 }
SELECT [number number number] FROM numbers(1); -- { clientError SYNTAX_ERROR }
SELECT [number number] FROM numbers(1); -- { clientError SYNTAX_ERROR }
SELECT [number AS number] FROM numbers(1);
SELECT cast('1234' lhs lhs, 'UInt32'), lhs; -- { clientError 62 }
SELECT cast('1234' lhs lhs, 'UInt32'), lhs; -- { clientError SYNTAX_ERROR }

View File

@ -1 +1 @@
SELECT TIMESTAMP_SUB (SELECT ILIKE INTO OUTFILE , accurateCast ) FROM TIMESTAMP_SUB ( MINUTE , ) GROUP BY accurateCast; -- { clientError 62 }
SELECT TIMESTAMP_SUB (SELECT ILIKE INTO OUTFILE , accurateCast ) FROM TIMESTAMP_SUB ( MINUTE , ) GROUP BY accurateCast; -- { clientError SYNTAX_ERROR }

View File

@ -1 +1 @@
CREATE VIEW X TO Y AS SELECT 1; -- { clientError 62 }
CREATE VIEW X TO Y AS SELECT 1; -- { clientError SYNTAX_ERROR }

View File

@ -1,4 +1,4 @@
DROP TABLE IF EXISTS tab;
create table tab (d Int64, s AggregateFunction(groupUniqArrayArray, Array(UInt64)), c SimpleAggregateFunction(groupUniqArrayArray, Array(UInt64))) engine = SummingMergeTree() order by d;
INSERT INTO tab VALUES (1, 'このコー'); -- { clientError 128 }
INSERT INTO tab VALUES (1, 'このコー'); -- { clientError TOO_LARGE_ARRAY_SIZE }
DROP TABLE tab;

View File

@ -22,7 +22,7 @@ SHOW CREATE POLICY ON db1_02703.`*`;
DROP POLICY db1_02703 ON db1_02703.*;
DROP POLICY tbl1_02703 ON db1_02703.table;
CREATE ROW POLICY any_02703 ON *.some_table USING 1 AS PERMISSIVE TO ALL; -- { clientError 62 }
CREATE ROW POLICY any_02703 ON *.some_table USING 1 AS PERMISSIVE TO ALL; -- { clientError SYNTAX_ERROR }
CREATE TABLE 02703_rqtable_default (x UInt8) ENGINE = MergeTree ORDER BY x;

View File

@ -43,7 +43,7 @@ SELECT count() FROM test;
INSERT INTO test VALUES(toDate('2023-10-09'));
-- for some reason only tuples are allowed as non-string arguments
ALTER TABLE test DROP PARTITION toMonday({partition:String}); --{clientError 62}
ALTER TABLE test DROP PARTITION toMonday({partition:String}); --{clientError SYNTAX_ERROR}
set param_partition_id = '20231009';

View File

@ -14,6 +14,6 @@ WITH toTimeZone(EventTime, 'Asia/Dubai') AS xyz SELECT uniq(*) FROM test.hits WH
SET optimize_move_to_prewhere = 0;
SET enable_multiple_prewhere_read_steps = 0;
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError 307 }
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError 307 }
SELECT uniq(URL) FROM test.hits PREWHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError 307 }
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError TOO_MANY_BYTES }
SELECT uniq(URL) FROM test.hits WHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError TOO_MANY_BYTES }
SELECT uniq(URL) FROM test.hits PREWHERE toTimeZone(EventTime, 'Asia/Dubai') >= '2014-03-20 00:00:00' AND URL != '' AND toTimeZone(EventTime, 'Asia/Dubai') < '2014-03-21 00:00:00'; -- { serverError TOO_MANY_BYTES }

View File

@ -1,20 +1,20 @@
-- the work for scalar subquery is properly accounted:
SET max_rows_to_read = 1000000;
SELECT 1 = (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError 158 }
SELECT 1 = (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError TOO_MANY_ROWS }
-- the work for subquery in IN is properly accounted:
SET max_rows_to_read = 1000000;
SELECT 1 IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError 158 }
SELECT 1 IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError TOO_MANY_ROWS }
-- this query reads from the table twice:
SET max_rows_to_read = 15000000;
SELECT count() IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) FROM test.hits WHERE NOT ignore(AdvEngineID); -- { serverError 158 }
SELECT count() IN (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)) FROM test.hits WHERE NOT ignore(AdvEngineID); -- { serverError TOO_MANY_ROWS }
-- the resources are properly accounted even if the subquery is evaluated in advance to facilitate the index analysis.
-- this query is using index and filter out the second reading pass.
SET max_rows_to_read = 1000000;
SELECT count() FROM test.hits WHERE CounterID > (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError 158 }
SELECT count() FROM test.hits WHERE CounterID > (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError TOO_MANY_ROWS }
-- this query is using index but have to read all the data twice.
SET max_rows_to_read = 10000000;
SELECT count() FROM test.hits WHERE CounterID < (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError 158 }
SELECT count() FROM test.hits WHERE CounterID < (SELECT count() FROM test.hits WHERE NOT ignore(AdvEngineID)); -- { serverError TOO_MANY_ROWS }