[pipelineX](fix) Fix BE crash caused by join and constant expr (#24862)
This commit is contained in:
@ -201,6 +201,9 @@ Status VExpr::open(RuntimeState* state, VExprContext* context,
|
||||
for (int i = 0; i < _children.size(); ++i) {
|
||||
RETURN_IF_ERROR(_children[i]->open(state, context, scope));
|
||||
}
|
||||
if (scope == FunctionContext::FRAGMENT_LOCAL) {
|
||||
RETURN_IF_ERROR(VExpr::get_const_col(context, nullptr));
|
||||
}
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
@ -466,6 +469,7 @@ Status VExpr::get_const_col(VExprContext* context,
|
||||
}
|
||||
|
||||
if (_constant_col != nullptr) {
|
||||
DCHECK(column_wrapper != nullptr);
|
||||
*column_wrapper = _constant_col;
|
||||
return Status::OK();
|
||||
}
|
||||
@ -479,7 +483,10 @@ Status VExpr::get_const_col(VExprContext* context,
|
||||
DCHECK(result != -1);
|
||||
const auto& column = block.get_by_position(result).column;
|
||||
_constant_col = std::make_shared<ColumnPtrWrapper>(column);
|
||||
*column_wrapper = _constant_col;
|
||||
if (column_wrapper != nullptr) {
|
||||
*column_wrapper = _constant_col;
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user