Fix some user-defined_rules bug

This commit is contained in:
obdev
2023-04-27 14:41:41 +00:00
committed by ob-robot
parent cef0b50339
commit 271e8aa047
4 changed files with 38 additions and 13 deletions

View File

@ -449,7 +449,14 @@ int ObRawExprDeduceType::calc_result_type(ObNonTerminalRawExpr &expr,
}
if (OB_FAIL(ret) && my_session_->is_ps_prepare_stage()) {
// the ps prepare stage does not do type deduction, and directly gives a default type.
result_type.set_null();
result_type.set_type(ObVarcharType);
result_type.set_calc_type(ObVarcharType);
for (int64_t i = 0; i < types.count(); i++) {
types.at(i).set_type(ObVarcharType);
types.at(i).set_calc_type(ObVarcharType);
}
expr.set_result_type(result_type);
expr.set_input_types(types);
ret = OB_SUCCESS;
}
// check parameters can cast to expected type