diff --git a/src/sql/engine/expr/ob_expr_unhex.h b/src/sql/engine/expr/ob_expr_unhex.h index f48a1894f8..a459df38a9 100644 --- a/src/sql/engine/expr/ob_expr_unhex.h +++ b/src/sql/engine/expr/ob_expr_unhex.h @@ -42,7 +42,9 @@ inline int ObExprUnhex::calc_result_type1(ObExprResType &type, int ret = OB_SUCCESS; UNUSED(type_ctx); - text.set_calc_type(common::ObVarcharType); + if (!ob_is_text_tc(text.get_type())) { + text.set_calc_type(common::ObVarcharType); + } if (ObTinyTextType == text.get_type()) { const int32_t MAX_TINY_TEXT_BUFFER_SIZE = 383;