ClickHouse/tests/queries/0_stateless/02869_insert_filenames_collisions.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
MySQL
Raw Normal View History

2023-09-18 22:27:04 +00:00
DROP TABLE IF EXISTS t_collisions;
SELECT lower(hex(reverse(CAST(sipHash128('very_very_long_column_name_that_will_be_replaced_with_hash'), 'FixedString(16)'))));
CREATE TABLE t_collisions
(
`very_very_long_column_name_that_will_be_replaced_with_hash` Int32,
`e798545eefc8b7a1c2c81ff00c064ad8` Int32
)
ENGINE = MergeTree
ORDER BY tuple()
SETTINGS replace_long_file_name_to_hash = 1, max_file_name_length = 42; -- { serverError BAD_ARGUMENTS }
DROP TABLE IF EXISTS t_collisions;
CREATE TABLE t_collisions
(
`very_very_long_column_name_that_will_be_replaced_with_hash` Int32,
`e798545eefc8b7a1c2c81ff00c064ad8` Int32
)
ENGINE = MergeTree
2023-09-19 08:48:40 +00:00
ORDER BY tuple()
SETTINGS replace_long_file_name_to_hash = 0;
2023-09-18 22:27:04 +00:00
INSERT INTO t_collisions VALUES (1, 1);
ALTER TABLE t_collisions MODIFY SETTING replace_long_file_name_to_hash = 1, max_file_name_length = 42; -- { serverError BAD_ARGUMENTS }
INSERT INTO t_collisions VALUES (2, 2);
SELECT * FROM t_collisions ORDER BY e798545eefc8b7a1c2c81ff00c064ad8;
DROP TABLE IF EXISTS t_collisions;
CREATE TABLE t_collisions
(
`id` Int,
`col` Array(String),
`col.s` Array(LowCardinality(String)),
`col.u` Array(LowCardinality(String))
)
ENGINE = MergeTree
ORDER BY id; -- { serverError BAD_ARGUMENTS }
DROP TABLE IF EXISTS t_collisions;