From c40f0fed2f8ba8160edc3fd1dee05d1005184726 Mon Sep 17 00:00:00 2001 From: obdev Date: Mon, 4 Jul 2022 10:14:58 +0800 Subject: [PATCH] =?UTF-8?q?[CP]=20=E5=88=9B=E5=BB=BArange=E5=88=86?= =?UTF-8?q?=E5=8C=BA=E4=B8=8Emysql=E4=B8=8D=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sql/resolver/ob_resolver_utils.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sql/resolver/ob_resolver_utils.cpp b/src/sql/resolver/ob_resolver_utils.cpp index 33f9b9660b..fed317450d 100644 --- a/src/sql/resolver/ob_resolver_utils.cpp +++ b/src/sql/resolver/ob_resolver_utils.cpp @@ -1462,6 +1462,14 @@ int ObResolverUtils::check_partition_range_value_result_type( } } } else { + if (OB_SUCC(ret) && !is_allow) { + if (part_value_expr_type == part_column_expr_type) { + is_allow = true; + } else if (ObDateTimeType == part_column_expr_type && + (ObDateType == part_value_expr_type || ObTimeType == part_value_expr_type)) { + is_allow = true; + } + } bool is_out_of_range = true; /* for mysql mode only (siged -> unsigned ) */ if (part_value_expr.is_const_expr() && (part_value_expr_tc == ObIntTC || part_value_expr_tc == ObNumberTC) && -- GitLab