mv_dependencies: style fixes

This commit is contained in:
Ilya Golshtein 2024-11-20 18:28:46 +03:00
parent 0a2b97c9c6
commit 85631dba54
2 changed files with 10 additions and 6 deletions

View File

@ -107,8 +107,6 @@ LoadTaskPtrs TablesLoader::startupTablesAsync(LoadJobSet startup_after)
LoadTaskPtrs result;
std::unordered_map<String, LoadTaskPtrs> startup_database; /// database name -> all its tables startup tasks
for (const auto & table_id : all_loading_dependencies.getTables())
{
// Make startup table task

View File

@ -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.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.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_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")
query(
"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()
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.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"
query("drop view t_to_a")