ClickHouse/tests/queries/0_stateless/02263_format_insert_settings.reference
Azat Khuzhin 33d99c8ffb Introduce compatiblity mode for SETTINGS after FORMAT
Add allow_settings_after_format_in_insert setting, OFF by default.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: s/parser_settings_after_format_compact/allow_settings_after_format_in_insert/ (suggested by vitlibar)
v3: replace ParserSettings with a flag (requested by vitlibar)
2022-04-07 16:36:34 +03:00

70 lines
2.5 KiB
Plaintext

insert into foo settings max_threads=1
Syntax error (query): failed at position 40 (end of query):
insert into foo format tsv settings max_threads=1
Can't format ASTInsertQuery with data, since data will be lost.
[multi] insert into foo format tsv settings max_threads=1
INSERT INTO foo
SETTINGS max_threads = 1
FORMAT tsv
[oneline] insert into foo format tsv settings max_threads=1
INSERT INTO foo SETTINGS max_threads = 1 FORMAT tsv
insert into foo settings max_threads=1 format tsv settings max_threads=1
You have SETTINGS before and after FORMAT
Cannot parse input: expected '\n' before: 'settings max_threads=1 1'
1
You have SETTINGS before and after FORMAT
[multi] insert into foo values
INSERT INTO foo FORMAT Values
[oneline] insert into foo values
INSERT INTO foo FORMAT Values
[multi] insert into foo select 1
INSERT INTO foo SELECT 1
[oneline] insert into foo select 1
INSERT INTO foo SELECT 1
[multi] insert into foo watch bar
INSERT INTO foo WATCH bar
[oneline] insert into foo watch bar
INSERT INTO foo WATCH bar
[multi] insert into foo format tsv
INSERT INTO foo FORMAT tsv
[oneline] insert into foo format tsv
INSERT INTO foo FORMAT tsv
[multi] insert into foo settings max_threads=1 values
INSERT INTO foo
SETTINGS max_threads = 1
FORMAT Values
[oneline] insert into foo settings max_threads=1 values
INSERT INTO foo SETTINGS max_threads = 1 FORMAT Values
[multi] insert into foo settings max_threads=1 select 1
INSERT INTO foo
SETTINGS max_threads = 1
SELECT 1
[oneline] insert into foo settings max_threads=1 select 1
INSERT INTO foo SETTINGS max_threads = 1 SELECT 1
[multi] insert into foo settings max_threads=1 watch bar
INSERT INTO foo
SETTINGS max_threads = 1
WATCH bar
[oneline] insert into foo settings max_threads=1 watch bar
INSERT INTO foo SETTINGS max_threads = 1 WATCH bar
[multi] insert into foo settings max_threads=1 format tsv
INSERT INTO foo
SETTINGS max_threads = 1
FORMAT tsv
[oneline] insert into foo settings max_threads=1 format tsv
INSERT INTO foo SETTINGS max_threads = 1 FORMAT tsv
[multi] insert into foo select 1 settings max_threads=1
INSERT INTO foo
SETTINGS max_threads = 1
SELECT 1
SETTINGS max_threads = 1
[oneline] insert into foo select 1 settings max_threads=1
INSERT INTO foo SETTINGS max_threads = 1 SELECT 1 SETTINGS max_threads = 1
[multi] insert into foo settings max_threads=1 select 1 settings max_threads=1
INSERT INTO foo
SETTINGS max_threads = 1
SELECT 1
SETTINGS max_threads = 1
[oneline] insert into foo settings max_threads=1 select 1 settings max_threads=1
INSERT INTO foo SETTINGS max_threads = 1 SELECT 1 SETTINGS max_threads = 1