[pipelineX](fix) Fix BE crash caused by join and constant expr (#24862)

This commit is contained in:
Gabriel
2023-09-25 21:01:09 +08:00
committed by GitHub
parent 6502da8917
commit b38b8b4494
14 changed files with 96 additions and 18 deletions

View File

@ -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();
}