diff --git a/src/Processors/Transforms/JoiningTransform.cpp b/src/Processors/Transforms/JoiningTransform.cpp index 473de823bf6..869b8395cdd 100644 --- a/src/Processors/Transforms/JoiningTransform.cpp +++ b/src/Processors/Transforms/JoiningTransform.cpp @@ -4,8 +4,6 @@ #include - - namespace ProfileEvents { extern const Event JoinBuildTableRowCount; diff --git a/tests/queries/0_stateless/03279_join_choose_build_table.sql b/tests/queries/0_stateless/03279_join_choose_build_table.sql index 6051342a2c7..e1d8010158d 100644 --- a/tests/queries/0_stateless/03279_join_choose_build_table.sql +++ b/tests/queries/0_stateless/03279_join_choose_build_table.sql @@ -49,7 +49,7 @@ SELECT if(ProfileEvents['JoinResultRowCount'] == 1000, 'ok', 'fail: ' || toString(ProfileEvents['JoinResultRowCount'])), Settings['query_plan_join_swap_table'], FROM system.query_log -WHERE type = 'QueryFinish' AND event_date = today() AND query_kind = 'Select' +WHERE type = 'QueryFinish' AND event_date >= yesterday() AND query_kind = 'Select' AND current_database = currentDatabase() AND query like '%products, sales%' AND log_comment = '03279_join_choose_build_table_no_idx' ORDER BY event_time DESC @@ -61,7 +61,7 @@ SELECT if(ProfileEvents['JoinResultRowCount'] == 1000, 'ok', 'fail: ' || toString(ProfileEvents['JoinResultRowCount'])), Settings['query_plan_join_swap_table'], FROM system.query_log -WHERE type = 'QueryFinish' AND event_date = today() AND query_kind = 'Select' +WHERE type = 'QueryFinish' AND event_date >= yesterday() AND query_kind = 'Select' AND current_database = currentDatabase() AND query like '%sales, products%' AND log_comment = '03279_join_choose_build_table_no_idx' ORDER BY event_time DESC @@ -75,7 +75,7 @@ SELECT if(ProfileEvents['JoinResultRowCount'] == 1000, 'ok', 'fail: ' || toString(ProfileEvents['JoinResultRowCount'])), Settings['query_plan_join_swap_table'], FROM system.query_log -WHERE type = 'QueryFinish' AND event_date = today() AND query_kind = 'Select' +WHERE type = 'QueryFinish' AND event_date >= yesterday() AND query_kind = 'Select' AND current_database = currentDatabase() AND query like '%products, sales%' AND log_comment = '03279_join_choose_build_table_idx' ORDER BY event_time DESC @@ -87,7 +87,7 @@ SELECT if(ProfileEvents['JoinResultRowCount'] == 1000, 'ok', 'fail: ' || toString(ProfileEvents['JoinResultRowCount'])), Settings['query_plan_join_swap_table'], FROM system.query_log -WHERE type = 'QueryFinish' AND event_date = today() AND query_kind = 'Select' +WHERE type = 'QueryFinish' AND event_date >= yesterday() AND query_kind = 'Select' AND current_database = currentDatabase() AND query like '%sales, products%' AND log_comment = '03279_join_choose_build_table_idx' ORDER BY event_time DESC