Fix coalesce bug
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -114,13 +114,9 @@ int ObExprResultTypeUtil::get_merge_result_type(ObExprResType &res_type,
|
|||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
ObObjType type1 = res_type1.get_type();
|
ObObjType type1 = res_type1.get_type();
|
||||||
ObObjType type2 = res_type2.get_type();
|
ObObjType type2 = res_type2.get_type();
|
||||||
if (OB_UNLIKELY(type1 >= ObMaxType || type2 >= ObMaxType)) {
|
ObObjType type = ObMaxType;
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = get_merge_result_type(type, type1, type2);
|
||||||
LOG_ERROR("the wrong type", K(type1),K(type2),K(ret));
|
res_type.set_type(type);
|
||||||
} else {
|
|
||||||
res_type.set_type(MERGE_RESULT_TYPE[type1][type2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,9 +128,13 @@ int ObExprResultTypeUtil::get_merge_result_type(ObObjType &type,
|
|||||||
if (OB_UNLIKELY(type1 >= ObMaxType || type2 >= ObMaxType)) {
|
if (OB_UNLIKELY(type1 >= ObMaxType || type2 >= ObMaxType)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_ERROR("the wrong type", K(type1),K(type2),K(ret));
|
LOG_ERROR("the wrong type", K(type1),K(type2),K(ret));
|
||||||
|
} else {
|
||||||
|
if (is_oracle_mode()) {
|
||||||
|
type = MERGE_RESULT_TYPE_ORACLE[type1][type2];
|
||||||
} else {
|
} else {
|
||||||
type = MERGE_RESULT_TYPE[type1][type2];
|
type = MERGE_RESULT_TYPE[type1][type2];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user