From df5bfcaa493d1ac37dd0b8c3cb2b1dcfdc93bb0c Mon Sep 17 00:00:00 2001 From: wjhh2008 Date: Sat, 28 Jan 2023 13:57:29 +0800 Subject: [PATCH] fix literal bug Co-authored-by: obdev --- src/sql/engine/expr/ob_expr_res_type.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sql/engine/expr/ob_expr_res_type.h b/src/sql/engine/expr/ob_expr_res_type.h index be64b927ec..9b97a1dce3 100644 --- a/src/sql/engine/expr/ob_expr_res_type.h +++ b/src/sql/engine/expr/ob_expr_res_type.h @@ -210,7 +210,8 @@ public: } OB_INLINE bool is_column() const { return !is_literal(); } - OB_INLINE bool is_literal() const { return get_param().get_type() == get_type(); } + OB_INLINE bool is_literal() const { return get_param().get_type() == get_type() + && get_param().get_collation_type() == get_collation_type(); } OB_INLINE bool is_null() const { return common::ObNullType == get_type(); } OB_INLINE bool is_mysql_question_mark_type() const { return is_varbinary() && 0 == get_length(); }