mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
fix null pointer of TreeRewriterResult::storage_snapshot (#35439)
This commit is contained in:
parent
9fb50422ce
commit
d28981e0e3
@ -751,7 +751,7 @@ void TreeOptimizer::apply(ASTPtr & query, TreeRewriterResult & result,
|
||||
if (settings.convert_query_to_cnf)
|
||||
converted_to_cnf = convertQueryToCNF(select_query);
|
||||
|
||||
if (converted_to_cnf && settings.optimize_using_constraints)
|
||||
if (converted_to_cnf && settings.optimize_using_constraints && result.storage_snapshot)
|
||||
{
|
||||
optimizeWithConstraints(select_query, result.aliases, result.source_columns_set,
|
||||
tables_with_columns, result.storage_snapshot->metadata, settings.optimize_append_index);
|
||||
|
Loading…
Reference in New Issue
Block a user