Fix fuzzed test.

This commit is contained in:
Nikolai Kochetov 2024-06-05 11:33:35 +00:00
parent 73ba23cae7
commit 7089d0d84d
3 changed files with 20 additions and 1 deletions

View File

@ -1228,7 +1228,7 @@ QueryPlan ReadFromMerge::createPlanForTable(
if (allow_experimental_analyzer)
{
InterpreterSelectQueryAnalyzer interpreter(modified_query_info.query_tree,
InterpreterSelectQueryAnalyzer interpreter(modified_query_info.query_tree->toAST(),
modified_context,
SelectQueryOptions(processed_stage));

View File

@ -0,0 +1,6 @@
1 a
2 b
2 b
1 a
2 b
2 b

View File

@ -0,0 +1,13 @@
DROP TABLE IF EXISTS t_02156_ololo_1;
DROP TABLE IF EXISTS t_02156_ololo_2;
DROP TABLE IF EXISTS t_02156_ololo_dist;
CREATE TABLE t_02156_ololo_1 (k UInt32, v Nullable(String)) ENGINE = MergeTree order by k;
CREATE TABLE t_02156_ololo_2 (k UInt32, v String) ENGINE = MergeTree order by k;
CREATE TABLE t_02156_ololo_dist (k UInt32, v String) ENGINE = Distributed(test_shard_localhost, currentDatabase(), t_02156_ololo_2);
insert into t_02156_ololo_1 values (1, 'a');
insert into t_02156_ololo_2 values (2, 'b');
select * from merge('t_02156_ololo') where k != 0 and notEmpty(v) order by k settings optimize_move_to_prewhere=0;
select * from merge('t_02156_ololo') where k != 0 and notEmpty(v) order by k settings optimize_move_to_prewhere=1;