diff --git a/be/src/vec/exprs/vectorized_fn_call.cpp b/be/src/vec/exprs/vectorized_fn_call.cpp index f92ec8bc3a2b0d..1bf05ce00e9c19 100644 --- a/be/src/vec/exprs/vectorized_fn_call.cpp +++ b/be/src/vec/exprs/vectorized_fn_call.cpp @@ -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());