mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
mv_dependencies: style fixes
This commit is contained in:
parent
0a2b97c9c6
commit
85631dba54
@ -107,8 +107,6 @@ LoadTaskPtrs TablesLoader::startupTablesAsync(LoadJobSet startup_after)
|
|||||||
LoadTaskPtrs result;
|
LoadTaskPtrs result;
|
||||||
std::unordered_map<String, LoadTaskPtrs> startup_database; /// database name -> all its tables startup tasks
|
std::unordered_map<String, LoadTaskPtrs> startup_database; /// database name -> all its tables startup tasks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (const auto & table_id : all_loading_dependencies.getTables())
|
for (const auto & table_id : all_loading_dependencies.getTables())
|
||||||
{
|
{
|
||||||
// Make startup table task
|
// Make startup table task
|
||||||
|
@ -294,15 +294,21 @@ def test_materialzed_views_cascaded_multiple(started_cluster):
|
|||||||
query("create table test_mv.t (Id UInt64) engine=MergeTree order by Id")
|
query("create table test_mv.t (Id UInt64) engine=MergeTree order by Id")
|
||||||
query("create table test_mv.a (Id UInt64) engine=MergeTree order by Id")
|
query("create table test_mv.a (Id UInt64) engine=MergeTree order by Id")
|
||||||
query("create table test_mv.x (IdText String) engine=MergeTree order by IdText")
|
query("create table test_mv.x (IdText String) engine=MergeTree order by IdText")
|
||||||
query("create table test_mv.z (Id UInt64, IdTextLength UInt64) engine=MergeTree order by Id")
|
query(
|
||||||
|
"create table test_mv.z (Id UInt64, IdTextLength UInt64) engine=MergeTree order by Id"
|
||||||
|
)
|
||||||
query("create materialized view t_to_a to test_mv.a as select Id from test_mv.t")
|
query("create materialized view t_to_a to test_mv.a as select Id from test_mv.t")
|
||||||
query("create materialized view t_to_x to test_mv.x as select toString(Id) as IdText from test_mv.t")
|
query(
|
||||||
query("create materialized view ax_to_z to test_mv.z as select Id, (select max(length(IdText)) from test_mv.x) as IdTextLength from test_mv.a")
|
"create materialized view t_to_x to test_mv.x as select toString(Id) as IdText from test_mv.t"
|
||||||
|
)
|
||||||
|
query(
|
||||||
|
"create materialized view ax_to_z to test_mv.z as select Id, (select max(length(IdText)) from test_mv.x) as IdTextLength from test_mv.a"
|
||||||
|
)
|
||||||
|
|
||||||
node1.restart_clickhouse()
|
node1.restart_clickhouse()
|
||||||
query("insert into test_mv.t values(42)")
|
query("insert into test_mv.t values(42)")
|
||||||
assert query("select * from test_mv.a Format CSV") == "42\n"
|
assert query("select * from test_mv.a Format CSV") == "42\n"
|
||||||
assert query("select * from test_mv.x Format CSV") == "\"42\"\n"
|
assert query("select * from test_mv.x Format CSV") == '"42"\n'
|
||||||
assert query("select * from test_mv.z Format CSV") == "42,2\n"
|
assert query("select * from test_mv.z Format CSV") == "42,2\n"
|
||||||
|
|
||||||
query("drop view t_to_a")
|
query("drop view t_to_a")
|
||||||
|
Loading…
Reference in New Issue
Block a user