Fix a bug of omitting to set res type length for lob exprs

This commit is contained in:
obdev
2023-04-13 08:40:19 +00:00
committed by ob-robot
parent 475b0fa975
commit 3926fdba2f
8 changed files with 37 additions and 4 deletions

View File

@ -6146,7 +6146,9 @@ int ObOptimizerUtil::try_add_cast_to_set_child_list(ObIAllocator *allocator,
&& ob_is_oracle_numeric_type(right_type.get_type()))
|| (ob_is_oracle_temporal_type(left_type.get_type())
&& (ob_is_oracle_temporal_type(right_type.get_type())))
|| (left_type.is_urowid() && right_type.is_urowid()))) {
|| (left_type.is_urowid() && right_type.is_urowid())
|| (is_oracle_mode() && left_type.is_lob() && right_type.is_lob() && left_type.get_collation_type() == right_type.get_collation_type())
|| (is_oracle_mode() && left_type.is_lob_locator() && right_type.is_lob_locator() && left_type.get_collation_type() == right_type.get_collation_type()))) {
// || (left_type.is_lob() && right_type.is_lob() && !is_distinct))) {
// Originally, cases like "select clob from t union all select blob from t" return error
if (session_info->is_ps_prepare_stage()) {