[fix](function) fix coredump cause by return type mismatch of vectorized repeat function (#13868)
Will not support repeat function during upgrade in vectorized engine.
This commit is contained in:
@ -37,6 +37,15 @@ VectorizedFnCall::VectorizedFnCall(const doris::TExprNode& node) : VExpr(node) {
|
||||
|
||||
doris::Status VectorizedFnCall::prepare(doris::RuntimeState* state,
|
||||
const doris::RowDescriptor& desc, VExprContext* context) {
|
||||
// In 1.2-lts, repeat function return type is changed to always nullable,
|
||||
// which is not compatible with 1.1-lts
|
||||
if ("repeat" == _fn.name.function_name and !_data_type->is_nullable()) {
|
||||
const auto error_msg =
|
||||
"In progress of upgrading from 1.1-lts to 1.2-lts, vectorized repeat "
|
||||
"function cannot be executed, you can switch to non-vectorized engine by "
|
||||
"'set global enable_vectorized_engine = false'";
|
||||
return Status::InternalError(error_msg);
|
||||
}
|
||||
RETURN_IF_ERROR_OR_PREPARED(VExpr::prepare(state, desc, context));
|
||||
ColumnsWithTypeAndName argument_template;
|
||||
argument_template.reserve(_children.size());
|
||||
|
||||
Reference in New Issue
Block a user