Fix: check if table expression is present

This commit is contained in:
Igor Nikonov 2024-08-16 11:06:20 +00:00
parent 49fc4cb87b
commit 29fffd34ac

View File

@ -54,7 +54,7 @@ std::stack<const QueryNode *> getSupportingParallelReplicasQuery(const IQueryTre
if (std::dynamic_pointer_cast<MergeTreeData>(storage) || typeid_cast<const StorageDummy *>(storage.get()))
{
/// parallel replicas is not supported with FINAL
if (table_node.getTableExpressionModifiers()->hasFinal())
if (table_node.getTableExpressionModifiers() && table_node.getTableExpressionModifiers()->hasFinal())
return {};
return res;