mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Merge pull request #48904 from ClickHouse/fix_set_withzk_and_analyzer
Fix segfault when set is not built yet
This commit is contained in:
commit
bd64a4a6fc
@ -123,6 +123,9 @@ public:
|
||||
}
|
||||
|
||||
auto set = column_set->getData();
|
||||
if (!set)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Not-ready Set passed as the second argument for function '{}'", getName());
|
||||
|
||||
auto set_types = set->getDataTypes();
|
||||
|
||||
if (tuple && set_types.size() != 1 && set_types.size() == tuple->tupleSize())
|
||||
|
@ -940,7 +940,8 @@ bool ExpressionActions::checkColumnIsAlwaysFalse(const String & column_name) con
|
||||
// Constant ColumnSet cannot be empty, so we only need to check non-constant ones.
|
||||
if (const auto * column_set = checkAndGetColumn<const ColumnSet>(action.node->column.get()))
|
||||
{
|
||||
if (column_set->getData()->isCreated() && column_set->getData()->getTotalRowCount() == 0)
|
||||
auto set = column_set->getData();
|
||||
if (set && set->isCreated() && set->getTotalRowCount() == 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ static void extractPathImpl(const ActionsDAG::Node & node, Paths & res, ContextP
|
||||
return;
|
||||
|
||||
auto set = column_set->getData();
|
||||
if (!set->isCreated())
|
||||
if (!set || !set->isCreated())
|
||||
return;
|
||||
|
||||
if (!set->hasExplicitSetElements())
|
||||
|
Loading…
Reference in New Issue
Block a user