Separate select result in test case

This commit is contained in:
Tuan Pham Anh 2024-09-02 03:40:19 +00:00
parent 63b57c0987
commit 28a77f2ef0
2 changed files with 8 additions and 4 deletions

View File

@ -6,15 +6,19 @@ CREATE TABLE default.foo_merge_tree\n(\n `x` Int8,\n `y` String\n)\nENGINE
1 a
2 b
CREATE TABLE default.clone_as_foo_merge_tree\n(\n `x` Int8,\n `y` String\n)\nENGINE = MergeTree\nPRIMARY KEY x\nORDER BY x\nSETTINGS index_granularity = 8192
from foo_merge_tree
1 a
2 b
from clone_as_foo_merge_tree
1 a
2 b
CREATE TABLE default.foo_replacing_merge_tree\n(\n `x` Int8,\n `y` String\n)\nENGINE = ReplacingMergeTree\nPRIMARY KEY x\nORDER BY x\nSETTINGS index_granularity = 8192
1 a
2 b
CREATE TABLE default.clone_as_foo_replacing_merge_tree\n(\n `x` Int8,\n `y` String\n)\nENGINE = ReplacingMergeTree\nPRIMARY KEY x\nORDER BY x\nSETTINGS index_granularity = 8192
from foo_replacing_merge_tree
1 a
2 b
from clone_as_foo_replacing_merge_tree
1 a
2 b

View File

@ -38,7 +38,9 @@ ${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM foo_merge_tree
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "CREATE TABLE clone_as_foo_merge_tree CLONE AS foo_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SHOW CREATE TABLE clone_as_foo_merge_tree"
echo "from foo_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM foo_merge_tree"
echo "from clone_as_foo_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM clone_as_foo_merge_tree"
# CLONE AS with a table of ReplacingMergeTree engine
@ -49,11 +51,9 @@ ${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM foo_replacing_
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "CREATE TABLE clone_as_foo_replacing_merge_tree CLONE AS foo_replacing_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SHOW CREATE TABLE clone_as_foo_replacing_merge_tree"
${CLICKHOUSE_CLIENT} -q "SELECT mutation_id, command, block_numbers.partition_id, block_numbers.number, parts_to_do, is_done \
FROM system.mutations WHERE database = '$CLICKHOUSE_DATABASE' and table = 'foo_replacing_merge_tree' ORDER BY mutation_id"
${CLICKHOUSE_CLIENT} -q "SELECT mutation_id, command, block_numbers.partition_id, block_numbers.number, parts_to_do, is_done \
FROM system.mutations WHERE database = '$CLICKHOUSE_DATABASE' and table = 'clone_as_foo_replacing_merge_tree' ORDER BY mutation_id"
echo "from foo_replacing_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM foo_replacing_merge_tree"
echo "from clone_as_foo_replacing_merge_tree"
${CLICKHOUSE_CLIENT} --optimize_throw_if_noop 1 -q "SELECT * FROM clone_as_foo_replacing_merge_tree"