Make 02015_column_default_dict_get_identifier parallelizable

This commit is contained in:
Raúl Marín 2024-08-06 18:18:09 +02:00
parent 1e631472f0
commit 38d891c6be

View File

@ -1,9 +1,6 @@
-- Tags: no-parallel
DROP DATABASE IF EXISTS 02015_db;
CREATE DATABASE 02015_db;
CREATE TABLE 02015_db.test_table
CREATE TABLE test_table
(
key_column UInt64,
data_column_1 UInt64,
@ -12,9 +9,9 @@ CREATE TABLE 02015_db.test_table
ENGINE = MergeTree
ORDER BY key_column;
INSERT INTO 02015_db.test_table VALUES (0, 0, 0);
INSERT INTO test_table VALUES (0, 0, 0);
CREATE DICTIONARY 02015_db.test_dictionary
CREATE DICTIONARY test_dictionary
(
key_column UInt64 DEFAULT 0,
data_column_1 UInt64 DEFAULT 1,
@ -22,20 +19,18 @@ CREATE DICTIONARY 02015_db.test_dictionary
)
PRIMARY KEY key_column
LAYOUT(DIRECT())
SOURCE(CLICKHOUSE(DB '02015_db' TABLE 'test_table'));
SOURCE(CLICKHOUSE(DB currentDatabase() TABLE 'test_table'));
CREATE TABLE 02015_db.test_table_default
CREATE TABLE test_table_default
(
data_1 DEFAULT dictGetUInt64('02015_db.test_dictionary', 'data_column_1', toUInt64(0)),
data_2 DEFAULT dictGet(02015_db.test_dictionary, 'data_column_2', toUInt64(0))
data_1 DEFAULT dictGetUInt64('test_dictionary', 'data_column_1', toUInt64(0)),
data_2 DEFAULT dictGet(test_dictionary, 'data_column_2', toUInt64(0))
)
ENGINE=TinyLog;
INSERT INTO 02015_db.test_table_default(data_1) VALUES (5);
SELECT * FROM 02015_db.test_table_default;
INSERT INTO test_table_default(data_1) VALUES (5);
SELECT * FROM test_table_default;
DROP TABLE 02015_db.test_table_default;
DROP DICTIONARY 02015_db.test_dictionary;
DROP TABLE 02015_db.test_table;
DROP DATABASE 02015_db;
DROP TABLE test_table_default;
DROP DICTIONARY test_dictionary;
DROP TABLE test_table;