fix use GCONF.enable_static_engine_for_query bug
This commit is contained in:
@ -3014,15 +3014,20 @@ int ObVectorExprOperator::calc_result_type2_(
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
ObExprResType cmp_type;
|
||||
if (OB_SUCC(calc_cmp_type2(cmp_type, type1, type2, type_ctx.get_coll_type()))) {
|
||||
if (OB_ISNULL(type_ctx.get_session())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("session is null", K(ret));
|
||||
} else if (OB_FAIL(calc_cmp_type2(cmp_type, type1, type2, type_ctx.get_coll_type()))) {
|
||||
LOG_WARN("calc cmp type2 failed", K(ret));
|
||||
} else {
|
||||
type.set_int(); // not tinyint, compatiable with MySQL
|
||||
type.set_calc_collation(cmp_type);
|
||||
type.set_calc_type(cmp_type.get_calc_type());
|
||||
ObExprOperator::calc_result_flag2(type, type1, type2);
|
||||
|
||||
if (GCONF.enable_static_engine_for_query()) {
|
||||
obj_cmp_func func_ptr = NULL;
|
||||
bool need_no_cast = ObRelationalExprOperator::can_cmp_without_cast(type1, type2, CO_EQ, func_ptr);
|
||||
if (type_ctx.get_session()->use_static_typing_engine()) {
|
||||
bool need_no_cast = ObRelationalExprOperator::can_cmp_without_cast(type1, type2,
|
||||
CO_EQ, *type_ctx.get_session());
|
||||
type1.set_calc_type(need_no_cast ? type1.get_type() : cmp_type.get_calc_type());
|
||||
type2.set_calc_type(need_no_cast ? type2.get_type() : cmp_type.get_calc_type());
|
||||
if (ob_is_string_type(cmp_type.get_calc_type())) {
|
||||
|
||||
Reference in New Issue
Block a user