bugfix : ob_item_type should append in last && json type calc

This commit is contained in:
obdev
2024-02-07 03:52:34 +00:00
committed by ob-robot
parent e675b663dc
commit 6421f310e9
3 changed files with 3 additions and 3 deletions

View File

@ -1105,7 +1105,6 @@ typedef enum ObItemType
T_DIAGNOSTICS,
T_JSON_TABLE_EXPRESSION,
T_JSON_TABLE_COLUMN,
T_XML_TABLE_EXPRESSION,
//pseudo_column
T_PSEUDO_COLUMN,
@ -2327,6 +2326,7 @@ typedef enum ObItemType
T_CLONE_TENANT,
T_CANCEL_CLONE,
T_XML_TABLE_EXPRESSION,
T_MAX //Attention: add a new type before T_MAX
} ObItemType;

View File

@ -504,7 +504,7 @@ int ObExprJsonObjectStar::calc_result_typeN(ObExprResType& type,
types_stack[0].set_calc_collation_type(types_stack[0].get_collation_type());
ObExprResType dst_type;
dst_type.set_type(ObObjType::ObVarcharType);
dst_type.set_collation_type(CS_TYPE_INVALID);
dst_type.set_collation_type(CS_TYPE_UTF8MB4_BIN);
dst_type.set_full_length(4000, 1);
if (OB_FAIL(ObJsonExprHelper::set_dest_type(types_stack[0], type, dst_type, type_ctx))) {
LOG_WARN("set dest type failed", K(ret));

View File

@ -119,7 +119,7 @@ int ObExprJsonQuery::calc_result_typeN(ObExprResType& type,
dst_type.set_collation_type(CS_TYPE_UTF8MB4_BIN);
} else {
dst_type.set_type(ObObjType::ObVarcharType);
dst_type.set_collation_type(CS_TYPE_INVALID);
dst_type.set_collation_type(CS_TYPE_UTF8MB4_BIN);
dst_type.set_full_length(4000, 1);
}
} else if (OB_FAIL(ObJsonExprHelper::get_cast_type(types_stack[2], dst_type))) {