From ffd0dacb152d7a473463733b0da7b30d61456c6b Mon Sep 17 00:00:00 2001 From: hezuojiao Date: Mon, 17 Jun 2024 23:43:05 +0000 Subject: [PATCH] Add object type placeholder for MySQL date/datetime types --- deps/oblib/src/common/ob_accuracy.cpp | 14 + .../src/common/object/ob_obj_compare.cpp | 237 +++++++++- deps/oblib/src/common/object/ob_obj_type.cpp | 10 + deps/oblib/src/common/object/ob_obj_type.h | 12 +- deps/oblib/src/common/object/ob_object.cpp | 2 + src/objit/src/ob_llvm_helper.cpp | 4 +- src/share/datum/ob_datum.cpp | 2 + src/share/datum/ob_datum.h | 12 +- src/share/object/ob_obj_cast.cpp | 369 ++++++++++++++- src/sql/engine/expr/ob_datum_cast.cpp | 370 ++++++++++++++- .../engine/expr/ob_expr_abs_result_type.map | 4 + .../expr/ob_expr_arithmetic_result_type.map | 218 +++++++++ src/sql/engine/expr/ob_expr_cast.h | 4 +- .../engine/expr/ob_expr_div_result_type.map | 218 +++++++++ .../expr/ob_expr_int_div_result_type.map | 220 ++++++++- .../expr/ob_expr_merge_result_type_oracle.map | 440 +++++++++++++++++- .../engine/expr/ob_expr_mod_result_type.map | 218 +++++++++ .../engine/expr/ob_expr_neg_result_type.map | 4 + src/sql/engine/expr/ob_expr_nvl_promotion.map | 236 ++++++++++ src/sql/engine/expr/ob_expr_operator.cpp | 2 + .../expr/ob_expr_relational_cmp_type.map | 436 +++++++++++++++++ .../expr/ob_expr_relational_equal_type.map | 221 ++++++++- .../expr/ob_expr_relational_result_type.map | 218 +++++++++ .../engine/expr/ob_expr_round_result_type.map | 2 + .../engine/expr/ob_expr_sum_result_type.map | 2 + .../optimizer/ob_opt_est_parameter_normal.h | 4 + .../blocksstable/encoding/ob_encoding_util.h | 6 + .../r/mysql/all_virtual_data_type.result | 6 + .../mysql/all_virtual_data_type_class.result | 6 + .../test_defined_expr_func_by_type.result | 218 +++++++++ .../share/test_defined_func_by_type.result | 218 +++++++++ .../storage/blocksstable/test_row_reader.cpp | 5 +- 32 files changed, 3917 insertions(+), 21 deletions(-) diff --git a/deps/oblib/src/common/ob_accuracy.cpp b/deps/oblib/src/common/ob_accuracy.cpp index 68eb9d6b3..18cc5b220 100644 --- a/deps/oblib/src/common/ob_accuracy.cpp +++ b/deps/oblib/src/common/ob_accuracy.cpp @@ -73,6 +73,8 @@ const ObAccuracy ObAccuracy::DDL_DEFAULT_ACCURACY[ObMaxType] = { ObAccuracy(), // user defined type in sql ObAccuracy(10, 0), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. }; const ObAccuracy ObAccuracy::DDL_DEFAULT_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = { @@ -129,6 +131,8 @@ const ObAccuracy ObAccuracy::DDL_DEFAULT_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = ObAccuracy(), // user defined type in sql ObAccuracy(10, 0), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. }, { ObAccuracy(), // null. @@ -183,6 +187,8 @@ const ObAccuracy ObAccuracy::DDL_DEFAULT_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = ObAccuracy(), // user defined type in sql ObAccuracy(10, 0), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. } }; @@ -239,6 +245,8 @@ const ObAccuracy ObAccuracy::MAX_ACCURACY[ObMaxType] = { ObAccuracy(), // user defined type in sql ObAccuracy(OB_MAX_DECIMAL_PRECISION, OB_MAX_DECIMAL_SCALE), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. }; const ObAccuracy ObAccuracy::MAX_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = { @@ -295,6 +303,8 @@ const ObAccuracy ObAccuracy::MAX_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = { ObAccuracy(), // user defined type in sql ObAccuracy(OB_MAX_DECIMAL_PRECISION, OB_MAX_DECIMAL_SCALE), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. }, { /* Oracle */ ObAccuracy(), // null. @@ -349,6 +359,8 @@ const ObAccuracy ObAccuracy::MAX_ACCURACY2[ORACLE_MODE + 1][ObMaxType] = { ObAccuracy(), // user defined type in sql ObAccuracy(OB_MAX_DECIMAL_PRECISION, OB_MAX_DECIMAL_SCALE), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(10, 0), // mysql date. + ObAccuracy(19, 6), // mysql datetime. } }; @@ -405,6 +417,8 @@ const ObAccuracy ObAccuracy::DML_DEFAULT_ACCURACY[ObMaxType] = { ObAccuracy(), // user defined type in sql ObAccuracy(), // decimal int ObAccuracy(), // collection type in sql + ObAccuracy(0, 6), // mysql date. + ObAccuracy(0, 0), // mysql datetime. }; const ObAccuracy ObAccuracy::MAX_ACCURACY_OLD[ObMaxType] = { diff --git a/deps/oblib/src/common/object/ob_obj_compare.cpp b/deps/oblib/src/common/object/ob_obj_compare.cpp index 7052253d9..5c942a574 100644 --- a/deps/oblib/src/common/object/ob_obj_compare.cpp +++ b/deps/oblib/src/common/object/ob_obj_compare.cpp @@ -3054,6 +3054,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_LEFTNULL_ENTRY(ObMaxTC),// decimalint NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // int DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3083,6 +3085,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObIntTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // uint DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3112,6 +3116,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObUIntTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // float DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3141,6 +3147,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // double DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3170,6 +3178,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // number DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3199,6 +3209,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObNumberTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // datetime DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3228,6 +3240,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimalint NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // date DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3257,6 +3271,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // time DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3286,6 +3302,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // year DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3315,6 +3333,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // string DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3344,6 +3364,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // extend DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObExtendTC), @@ -3373,6 +3395,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObExtendTC, ObMaxTC, ObExtendTC, ObMaxTC), // decimalint NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // unknown DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3402,6 +3426,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // text DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3431,6 +3457,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // bit DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3460,6 +3488,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { //enumset DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3489,6 +3519,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObEnumSetTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { //enumsetInner DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3518,6 +3550,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObEnumSetInnerTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // otimestamp DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3547,6 +3581,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // raw DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3576,6 +3612,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // interval DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3605,6 +3643,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // rowid DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3634,6 +3674,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // lob DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3663,6 +3705,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // json DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3692,6 +3736,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // geometry DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3721,6 +3767,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // udt DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), @@ -3750,6 +3798,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObUserDefinedSQLTC, ObUserDefinedSQLTC, ObMaxTC, ObMaxTC), // udt NULL, // decimal int NULL, // collection + NULL, // mysql date + NULL, // mysql datetime }, { // decimal int DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), // null @@ -3779,6 +3829,8 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObDecimalIntTC, ObDecimalIntTC, ObMaxTC, ObMaxTC), // decimalint NULL, // collection + NULL, // mysql date + NULL, // mysql datetime } , { // collection @@ -3809,8 +3861,71 @@ const obj_cmp_func_nullsafe ObObjCmpFuncs::cmp_funcs_nullsafe[ObMaxTC][ObMaxTC] NULL, // udt NULL, // decimalint DECLARE_CMP_FUNCS_NULLSAFE_ENTRY(ObCollectionSQLTC, ObCollectionSQLTC, ObMaxTC, ObMaxTC), // collection + NULL, // mysql date + NULL, // mysql datetime }, - + { // mysql date + DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), // null + NULL, // int + NULL, // uint + NULL, // float + NULL, // double + NULL, // number + NULL, // datetime + NULL, // date + NULL, // time + NULL, // year + NULL, // string + NULL, // extend + NULL, // unknown + NULL, // text + NULL, // bit + NULL, // enumset + NULL, // enumset inner + NULL, // otimestamp + NULL, // raw. + NULL, // interval + NULL, // rowid + NULL, // lob + NULL, // json + NULL, // geometry + NULL, // udt + NULL, // decimalint + NULL, // collection + NULL, // mysql date + NULL, // mysql datetime + }, + { // mysql datetime + DECLARE_CMP_FUNCS_NULLSAFE_RIGHTNULL_ENTRY(ObMaxTC), // null + NULL, // int + NULL, // uint + NULL, // float + NULL, // double + NULL, // number + NULL, // datetime + NULL, // date + NULL, // time + NULL, // year + NULL, // string + NULL, // extend + NULL, // unknown + NULL, // text + NULL, // bit + NULL, // enumset + NULL, // enumset inner + NULL, // otimestamp + NULL, // raw. + NULL, // interval + NULL, // rowid + NULL, // lob + NULL, // json + NULL, // geometry + NULL, // udt + NULL, // decimalint + NULL, // collection + NULL, // mysql date + NULL, // mysql datetime + }, }; const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = @@ -3843,6 +3958,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY(ObNullTC, ObMaxTC),//udt DEFINE_CMP_FUNCS_ENTRY(ObNullTC, ObMaxTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // int DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -3872,6 +3989,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObIntTC, ObDecimalIntTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // uint DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -3901,6 +4020,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObUIntTC, ObDecimalIntTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // float DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -3930,6 +4051,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // double DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -3959,6 +4082,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // number DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -3988,6 +4113,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObNumberTC, ObDecimalIntTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // datetime DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4017,6 +4144,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // date DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4046,6 +4175,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // time DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4075,6 +4206,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // year DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4104,6 +4237,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // string DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4133,6 +4268,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // extend DEFINE_CMP_FUNCS_ENTRY(ObExtendTC, ObNullTC), @@ -4162,6 +4299,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObExtendTC, ObMaxTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // unknown DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4191,6 +4330,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, //decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // text DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4220,6 +4361,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, //decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // bit DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4249,6 +4392,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { //enumset DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4278,6 +4423,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObEnumSetTC, ObDecimalIntTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { //enumsetInner DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4307,6 +4454,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY(ObEnumSetInnerTC, ObDecimalIntTC), // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // otimestamp DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4336,6 +4485,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // raw DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), @@ -4365,6 +4516,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // interval DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4394,6 +4547,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // rowid DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4423,6 +4578,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // lob DEFINE_CMP_FUNCS_ENTRY_NULL, //null @@ -4452,6 +4609,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // json DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4481,6 +4640,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // geometry DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4510,6 +4671,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // udt DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4539,6 +4702,8 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY(ObUserDefinedSQLTC, ObUserDefinedSQLTC), // compare for udt nested null bitmap DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // decimalint DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4567,7 +4732,9 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //geometry DEFINE_CMP_FUNCS_ENTRY_NULL, // udt DEFINE_CMP_FUNCS_ENTRY(ObDecimalIntTC, ObDecimalIntTC), // decimal int - DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime }, { // collection DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null @@ -4597,7 +4764,71 @@ const obj_cmp_func ObObjCmpFuncs::cmp_funcs[ObMaxTC][ObMaxTC][CO_MAX] = DEFINE_CMP_FUNCS_ENTRY_NULL, //udt DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int DEFINE_CMP_FUNCS_ENTRY(ObCollectionSQLTC, ObCollectionSQLTC), // collection - } + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime + }, + { // mysql date + DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null + DEFINE_CMP_FUNCS_ENTRY_NULL, // int + DEFINE_CMP_FUNCS_ENTRY_NULL, // uint + DEFINE_CMP_FUNCS_ENTRY_NULL, // float + DEFINE_CMP_FUNCS_ENTRY_NULL, // double + DEFINE_CMP_FUNCS_ENTRY_NULL, // number + DEFINE_CMP_FUNCS_ENTRY_NULL, // datetime + DEFINE_CMP_FUNCS_ENTRY_NULL, // date + DEFINE_CMP_FUNCS_ENTRY_NULL, // time + DEFINE_CMP_FUNCS_ENTRY_NULL, // year + DEFINE_CMP_FUNCS_ENTRY_NULL, // string + DEFINE_CMP_FUNCS_ENTRY_NULL, // extend + DEFINE_CMP_FUNCS_ENTRY_NULL, // unknown + DEFINE_CMP_FUNCS_ENTRY_NULL, // text + DEFINE_CMP_FUNCS_ENTRY_NULL, // bit + DEFINE_CMP_FUNCS_ENTRY_NULL, // enumset + DEFINE_CMP_FUNCS_ENTRY_NULL, // enumsetInner will not go here + DEFINE_CMP_FUNCS_ENTRY_NULL, // otimestamp + DEFINE_CMP_FUNCS_ENTRY_NULL, // raw + DEFINE_CMP_FUNCS_ENTRY_NULL, // interval + DEFINE_CMP_FUNCS_ENTRY_NULL, //rowid + DEFINE_CMP_FUNCS_ENTRY_NULL, //lob + DEFINE_CMP_FUNCS_ENTRY_NULL, // json + DEFINE_CMP_FUNCS_ENTRY_NULL, //geometry + DEFINE_CMP_FUNCS_ENTRY_NULL, // udt + DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int + DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime + }, + { // mysql datetime + DEFINE_CMP_FUNCS_ENTRY(ObMaxTC, ObNullTC), //null + DEFINE_CMP_FUNCS_ENTRY_NULL, // int + DEFINE_CMP_FUNCS_ENTRY_NULL, // uint + DEFINE_CMP_FUNCS_ENTRY_NULL, // float + DEFINE_CMP_FUNCS_ENTRY_NULL, // double + DEFINE_CMP_FUNCS_ENTRY_NULL, // number + DEFINE_CMP_FUNCS_ENTRY_NULL, // datetime + DEFINE_CMP_FUNCS_ENTRY_NULL, // date + DEFINE_CMP_FUNCS_ENTRY_NULL, // time + DEFINE_CMP_FUNCS_ENTRY_NULL, // year + DEFINE_CMP_FUNCS_ENTRY_NULL, // string + DEFINE_CMP_FUNCS_ENTRY_NULL, // extend + DEFINE_CMP_FUNCS_ENTRY_NULL, // unknown + DEFINE_CMP_FUNCS_ENTRY_NULL, // text + DEFINE_CMP_FUNCS_ENTRY_NULL, // bit + DEFINE_CMP_FUNCS_ENTRY_NULL, // enumset + DEFINE_CMP_FUNCS_ENTRY_NULL, // enumsetInner will not go here + DEFINE_CMP_FUNCS_ENTRY_NULL, // otimestamp + DEFINE_CMP_FUNCS_ENTRY_NULL, // raw + DEFINE_CMP_FUNCS_ENTRY_NULL, // interval + DEFINE_CMP_FUNCS_ENTRY_NULL, //rowid + DEFINE_CMP_FUNCS_ENTRY_NULL, //lob + DEFINE_CMP_FUNCS_ENTRY_NULL, // json + DEFINE_CMP_FUNCS_ENTRY_NULL, //geometry + DEFINE_CMP_FUNCS_ENTRY_NULL, // udt + DEFINE_CMP_FUNCS_ENTRY_NULL, // decimal int + DEFINE_CMP_FUNCS_ENTRY_NULL, // collection + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql date + DEFINE_CMP_FUNCS_ENTRY_NULL, // mysql datetime + }, }; const ObObj ObObjCmpFuncs::cmp_res_objs_bool[CR_BOOL_CNT] = diff --git a/deps/oblib/src/common/object/ob_obj_type.cpp b/deps/oblib/src/common/object/ob_obj_type.cpp index a256e3ea7..92ef655a5 100644 --- a/deps/oblib/src/common/object/ob_obj_type.cpp +++ b/deps/oblib/src/common/object/ob_obj_type.cpp @@ -106,6 +106,8 @@ const char *ob_sql_type_str(ObObjType type) "UDT", "DECIMAL_INT", "COLLECTION", + "MYSQL_DATE", + "MYSQL_DATETIME", "" }, { @@ -163,6 +165,8 @@ const char *ob_sql_type_str(ObObjType type) "UDT", "DECIMAL_INT", "COLLECTION", + "MYSQL_DATE", + "MYSQL_DATETIME", "" } }; @@ -763,6 +767,8 @@ int ob_sql_type_str(char *buff, nullptr, // udt ob_decimal_int_str, //decimal int nullptr, // collection + nullptr, // mysql date + nullptr, // mysql datetime ob_empty_str // MAX }; static_assert(sizeof(sql_type_name) / sizeof(ObSqlTypeStrFunc) == ObMaxType + 1, "Not enough initializer"); @@ -850,6 +856,8 @@ int ob_sql_type_str(char *buff, nullptr,//udt ob_decimal_int_str_without_accuracy,//decimal int nullptr,//collection + nullptr,//mysql date + nullptr,//mysql datetime ob_empty_str // MAX }; static_assert(sizeof(sql_type_name) / sizeof(obSqlTypeStrWithoutAccuracyFunc) == ObMaxType + 1, "Not enough initializer"); @@ -950,6 +958,8 @@ const char *ob_sql_tc_str(ObObjTypeClass tc) "UDT", "DECIMAL_INT", "COLLECTION", + "MYSQL_DATE", + "MYSQL_DATETIME", "" }; static_assert(sizeof(sql_tc_name) / sizeof(const char *) == ObMaxTC + 1, "Not enough initializer"); diff --git a/deps/oblib/src/common/object/ob_obj_type.h b/deps/oblib/src/common/object/ob_obj_type.h index cf6189961..c16a9a34d 100644 --- a/deps/oblib/src/common/object/ob_obj_type.h +++ b/deps/oblib/src/common/object/ob_obj_type.h @@ -93,6 +93,8 @@ enum ObObjType ObUserDefinedSQLType = 49, // User defined type in SQL ObDecimalIntType = 50, // decimal int type ObCollectionSQLType = 51, // collection(varray and nested table) in SQL + ObMySQLDateType = 52, // date type which is compatible with MySQL. + ObMySQLDateTimeType = 53, // datetime type which is compatible with MySQL. ObMaxType // invalid type, or count of obj type }; @@ -214,6 +216,8 @@ static ObObjOType OBJ_TYPE_TO_O_TYPE[ObMaxType+1] = { ObOUDTSqlType, //ObUserDefinedSQLType = 49, ObONumberType, //ObDecimalIntType = 50, ObOCollectionSqlType, //ObCollectionSQLType = 51, + ObONotSupport, //ObMySQLDateType = 52, + ObONotSupport, //ObMySQLDateTimeType = 53, ObONotSupport //ObMaxType, }; @@ -247,6 +251,8 @@ enum ObObjTypeClass ObUserDefinedSQLTC = 24, // user defined type class in SQL ObDecimalIntTC = 25, // decimal int class ObCollectionSQLTC = 26, // collection type class in SQL + ObMySQLDateTC = 27, // mysql date type class + ObMySQLDateTimeTC = 28, // mysql date time type class ObMaxTC, // invalid type classes are below, only used as the result of XXXX_type_promotion() // to indicate that the two obj can't be promoted to the same type. @@ -309,7 +315,9 @@ enum ObObjTypeClass (ObGeometryType, ObGeometryTC), \ (ObUserDefinedSQLType, ObUserDefinedSQLTC),\ (ObDecimalIntType, ObDecimalIntTC),\ - (ObCollectionSQLType, ObCollectionSQLTC) + (ObCollectionSQLType, ObCollectionSQLTC), \ + (ObMySQLDateType, ObMySQLDateTC), \ + (ObMySQLDateTimeType, ObMySQLDateTimeTC) #define SELECT_SECOND(x, y) y #define SELECT_TC(arg) SELECT_SECOND arg @@ -351,6 +359,8 @@ const ObObjType OBJ_DEFAULT_TYPE[ObActualMaxTC] = ObUserDefinedSQLType, // user defined type in sql ObDecimalIntType, // decimal int ObCollectionSQLType, // collection type in sql + ObMySQLDateType, // mysql date + ObMySQLDateTimeType, // mysql datetime ObMaxType, // maxtype ObUInt64Type, // int&uint ObMaxType, // lefttype diff --git a/deps/oblib/src/common/object/ob_object.cpp b/deps/oblib/src/common/object/ob_object.cpp index 9e8ddfe84..2aabbc397 100644 --- a/deps/oblib/src/common/object/ob_object.cpp +++ b/deps/oblib/src/common/object/ob_object.cpp @@ -1901,6 +1901,8 @@ ObObjTypeFuncs OBJ_FUNCS[ObMaxType] = DEF_FUNC_ENTRY(ObUserDefinedSQLType),// 49, udt DEF_FUNC_ENTRY(ObDecimalIntType), // 50, decimal int DEF_FUNC_ENTRY(ObCollectionSQLType), // 51, collection + DEF_FUNC_ENTRY(ObNullType), // 52, mysql date + DEF_FUNC_ENTRY(ObNullType), // 53, mysql datetime }; ob_obj_hash ObObjUtil::get_murmurhash_v3(ObObjType type) diff --git a/src/objit/src/ob_llvm_helper.cpp b/src/objit/src/ob_llvm_helper.cpp index cfe2eb7a5..e6d00b9b6 100644 --- a/src/objit/src/ob_llvm_helper.cpp +++ b/src/objit/src/ob_llvm_helper.cpp @@ -125,7 +125,9 @@ static ObGetIRType OB_IR_TYPE[common::ObMaxType + 1] = NULL, //49.ObUserDefinedSQLType NULL, //50. ObDecimalIntType NULL, //51.ObCollectionSQLType - NULL, //52.ObMaxType + reinterpret_cast(ObIRType::getInt32Ty), //52.ObMySQLDateType + reinterpret_cast(ObIRType::getInt64Ty), //53.ObMySQLDateTimeType + NULL, //54.ObMaxType }; template diff --git a/src/share/datum/ob_datum.cpp b/src/share/datum/ob_datum.cpp index 199c4b511..4e91227de 100644 --- a/src/share/datum/ob_datum.cpp +++ b/src/share/datum/ob_datum.cpp @@ -76,6 +76,8 @@ ObObjDatumMapType ObDatum::get_obj_datum_map_type(const ObObjType type) OBJ_DATUM_STRING, // ObUserDefinedSQLType OBJ_DATUM_DECIMALINT, // ObDecimalIntType OBJ_DATUM_STRING, // ObCollectionSQLType + OBJ_DATUM_4BYTE_DATA, // ObMySQLDateType + OBJ_DATUM_8BYTE_DATA, // ObMySQLDateTimeType }; static_assert(sizeof(maps) / sizeof(maps[0]) == ObMaxType, "new added type should extend this map"); diff --git a/src/share/datum/ob_datum.h b/src/share/datum/ob_datum.h index e86ff95d5..96448075d 100644 --- a/src/share/datum/ob_datum.h +++ b/src/share/datum/ob_datum.h @@ -893,13 +893,15 @@ inline int ObDatum::from_obj(const ObObj &obj) case ObBitType: case ObEnumType: case ObSetType: - case ObIntervalYMType: { + case ObIntervalYMType: + case ObMySQLDateTimeType: { obj2datum(obj); break; } case ObFloatType: case ObUFloatType: - case ObDateType: { + case ObDateType: + case ObMySQLDateType: { obj2datum(obj); break; } @@ -1039,13 +1041,15 @@ inline int ObDatum::to_obj(ObObj &obj, const ObObjMeta &meta) const case ObBitType: case ObEnumType: case ObSetType: - case ObIntervalYMType: { + case ObIntervalYMType: + case ObMySQLDateTimeType: { datum2obj(obj); break; } case ObFloatType: case ObUFloatType: - case ObDateType: { + case ObDateType: + case ObMySQLDateType: { datum2obj(obj); break; } diff --git a/src/share/object/ob_obj_cast.cpp b/src/share/object/ob_obj_cast.cpp index c6d047338..eed6dd21f 100644 --- a/src/share/object/ob_obj_cast.cpp +++ b/src/share/object/ob_obj_cast.cpp @@ -7038,6 +7038,16 @@ ObCastEnumOrSetFunc OB_CAST_ENUM_OR_SET[ObMaxTC][2] = cast_not_support_enum_set,/*enum*/ cast_not_support_enum_set,/*set*/ }, + { + /*ObMySQLDateTC -> enum_or_set*/ + cast_not_support_enum_set,/*enum*/ + cast_not_support_enum_set,/*set*/ + }, + { + /*ObMySQLDateTimeTC -> enum_or_set*/ + cast_not_support_enum_set,/*enum*/ + cast_not_support_enum_set,/*set*/ + }, }; //////////////////////////////////////////////////////////// @@ -10625,6 +10635,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, mysql mode does not have udt*/ cast_identity,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -10655,6 +10667,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ int_decimalint,/*decimal int*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -10685,6 +10699,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ uint_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -10715,6 +10731,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ float_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -10745,6 +10763,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ double_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -10775,6 +10795,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ number_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -10805,6 +10827,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ datetime_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -10835,6 +10859,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ date_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -10865,6 +10891,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ time_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -10895,6 +10923,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ year_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -10925,6 +10955,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ string_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -10955,6 +10987,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = pl_extend_sql_udt,/*udt*/ cast_not_support,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -10985,6 +11019,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ unknown_other,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -11015,6 +11051,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ text_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -11045,6 +11083,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ bit_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enum -> XXX*/ @@ -11075,6 +11115,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ enumset_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -11105,6 +11147,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ enumset_inner_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -11135,6 +11179,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -11165,6 +11211,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -11195,6 +11243,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*rowid -> XXX*/ @@ -11225,6 +11275,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -11255,6 +11307,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ lob_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX*/ @@ -11285,6 +11339,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ json_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geometry -> XXX*/ @@ -11315,6 +11371,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt*/ geometry_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX*/ @@ -11343,7 +11401,10 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected,/*json*/ cast_not_expected,/*geometry*/ cast_not_expected,/*udt*/ - cast_not_expected,/*decimal int */ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint-> XXX*/ @@ -11374,6 +11435,8 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected, /*udt*/ decimalint_decimalint,/*decimalint*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection-> xxx*/ @@ -11404,7 +11467,73 @@ ObObjCastFunc OB_OBJ_CAST[ObMaxTC][ObMaxTC] = cast_not_expected, /*udt*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection*/ - } + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date-> xxx*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime-> xxx*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, }; ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = @@ -11438,6 +11567,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_identity,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -11468,6 +11599,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ int_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -11498,6 +11631,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ uint_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -11528,6 +11663,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ float_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -11558,6 +11695,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ double_decimalint, /*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -11588,6 +11727,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ number_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -11618,6 +11759,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -11648,6 +11791,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -11678,6 +11823,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -11708,6 +11855,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -11738,6 +11887,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ string_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -11768,6 +11919,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = pl_extend_sql_udt,/*udt*/ cast_not_support,/*decimalint*/ pl_extend_sql_udt,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -11798,6 +11951,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ unknown_other,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -11828,6 +11983,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ text_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -11858,6 +12015,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enum -> XXX*/ @@ -11888,6 +12047,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -11918,6 +12079,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -11948,6 +12111,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -11978,6 +12143,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -12008,6 +12175,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*rowid -> XXX*/ @@ -12038,6 +12207,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -12068,6 +12239,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ lob_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX, not support oracle currently*/ @@ -12098,6 +12271,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geometry -> XXX, not support oracle currently*/ @@ -12128,6 +12303,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX, not support oracle currently*/ @@ -12158,6 +12335,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimal int*/ cast_udt_to_other_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint -> XXX*/ @@ -12188,6 +12367,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support, /*udt*/ decimalint_decimalint,/*decimalint*/ cast_to_udt_not_support, /*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection -> XXX*/ @@ -12218,6 +12399,72 @@ ObObjCastFunc OBJ_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_udt_to_other_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, }; @@ -12261,6 +12508,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_identity,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -12291,6 +12540,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ int_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -12321,6 +12572,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ uint_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -12351,6 +12604,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ float_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -12381,6 +12636,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ double_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -12411,6 +12668,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ number_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -12441,6 +12700,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -12471,6 +12732,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -12501,6 +12764,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -12531,6 +12796,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -12561,6 +12828,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = string_sql_udt,/*udt*/ string_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -12591,6 +12860,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = pl_extend_sql_udt,/*udt*/ cast_not_expected,/*decimalint*/ pl_extend_sql_udt,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -12621,6 +12892,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -12651,6 +12924,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ text_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -12681,6 +12956,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enum -> XXX*/ @@ -12711,6 +12988,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -12741,6 +13020,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -12771,6 +13052,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -12801,6 +13084,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -12831,6 +13116,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /* rowid -> XXX */ @@ -12861,6 +13148,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -12891,6 +13180,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ lob_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX*/ @@ -12921,6 +13212,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geoemtry -> XXX, not support oracle currently*/ @@ -12951,6 +13244,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX*/ @@ -12981,6 +13276,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimal int*/ cast_udt_to_other_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint -> XXX*/ @@ -13011,6 +13308,8 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support, /* udt */ decimalint_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection -> XXX*/ @@ -13041,6 +13340,72 @@ ObObjCastFunc OBJ_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimalint*/ cast_udt_to_other_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, }; diff --git a/src/sql/engine/expr/ob_datum_cast.cpp b/src/sql/engine/expr/ob_datum_cast.cpp index 29deaac8e..de7572f49 100644 --- a/src/sql/engine/expr/ob_datum_cast.cpp +++ b/src/sql/engine/expr/ob_datum_cast.cpp @@ -11781,6 +11781,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_eval_arg,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -11811,6 +11813,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ int_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -11841,6 +11845,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ uint_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -11871,6 +11877,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ float_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -11901,6 +11909,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ double_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -11931,6 +11941,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ number_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -11961,6 +11973,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -11991,6 +12005,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -12021,6 +12037,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -12051,6 +12069,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -12081,6 +12101,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = string_udt,/*udt*/ string_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -12111,6 +12133,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = pl_extend_sql_udt,/*udt*/ cast_not_expected,/*decimalint*/ pl_extend_sql_udt,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -12141,6 +12165,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -12170,6 +12196,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_inconsistent_types,/*geometry*/ cast_to_udt_not_support,/*udt*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -12200,6 +12228,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enum -> XXX*/ @@ -12230,6 +12260,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected, /*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -12260,6 +12292,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -12290,6 +12324,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -12320,6 +12356,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -12350,6 +12388,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /* rowid -> XXX */ @@ -12380,6 +12420,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -12410,6 +12452,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ lob_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX*/ @@ -12440,6 +12484,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geometry -> XXX*/ @@ -12470,6 +12516,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX*/ @@ -12500,6 +12548,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = udt_udt,/*udt*/ cast_not_expected,/*decimalint*/ cast_udt_to_other_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint -> XXX*/ @@ -12529,7 +12579,9 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_inconsistent_types,/*decimalint*/ cast_to_udt_not_support, /*udt*/ decimalint_decimalint,/*decimalint*/ - cast_not_expected, /*udt*/ + cast_not_expected, /*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection -> XXX*/ @@ -12560,7 +12612,73 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_IMPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimal int*/ cast_udt_to_other_not_support,/*collection*/ - } + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, }; // 目前代码里面没有使用该矩阵,Oracle模式都是使用impilicit矩阵 @@ -12596,6 +12714,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_eval_arg,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -12626,6 +12746,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ int_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -12656,6 +12778,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ uint_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -12686,6 +12810,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ float_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -12716,6 +12842,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ double_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -12746,6 +12874,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ number_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -12776,6 +12906,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -12806,6 +12938,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -12836,6 +12970,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -12866,6 +13002,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -12896,6 +13034,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = string_udt,/*udt*/ string_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -12926,6 +13066,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = pl_extend_sql_udt,/*udt*/ cast_not_support,/*decimalint*/ pl_extend_sql_udt,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -12956,6 +13098,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ unknown_other,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -12986,6 +13130,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ text_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -13016,6 +13162,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enum -> XXX*/ @@ -13046,6 +13194,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -13076,6 +13226,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -13106,6 +13258,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -13136,6 +13290,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -13166,6 +13322,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_expected,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*rowid -> XXX*/ @@ -13196,6 +13354,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -13226,6 +13386,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ lob_decimalint,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX*/ @@ -13256,6 +13418,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_to_udt_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geometry -> XXX*/ @@ -13286,6 +13450,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_not_support,/*udt*/ cast_not_support,/*decimalint*/ cast_not_support,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX*/ @@ -13316,6 +13482,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimal int*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint -> XXX*/ @@ -13346,6 +13514,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_to_udt_not_support, /*udt*/ decimalint_decimalint,/*decimalint*/ cast_to_udt_not_support, /*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection -> XXX*/ @@ -13376,7 +13546,73 @@ ObExpr::EvalFunc OB_DATUM_CAST_ORACLE_EXPLICIT[ObMaxTC][ObMaxTC] = cast_udt_to_other_not_support,/*udt*/ cast_udt_to_other_not_support,/*decimalint*/ cast_udt_to_other_not_support,/*collection*/ - } + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected, /*udt*/ + cast_not_expected,/*decimalint*/ + cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, }; ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = @@ -13410,6 +13646,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_eval_arg,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*int -> XXX*/ @@ -13440,6 +13678,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ int_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -13470,6 +13710,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ uint_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -13500,6 +13742,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ float_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -13530,6 +13774,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ double_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -13560,6 +13806,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ number_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -13590,6 +13838,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ datetime_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -13620,6 +13870,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ date_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -13650,6 +13902,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ time_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -13680,6 +13934,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ year_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -13710,6 +13966,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ string_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -13740,6 +13998,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_support,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -13770,6 +14030,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ unknown_other,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -13800,6 +14062,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ text_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -13830,6 +14094,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ bit_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset -> XXX*/ @@ -13860,6 +14126,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ enumset_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*enumset_inner -> XXX*/ @@ -13890,6 +14158,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ enumset_inner_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*otimestamp -> XXX*/ @@ -13920,6 +14190,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*raw -> XXX*/ @@ -13950,6 +14222,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*interval -> XXX*/ @@ -13980,6 +14254,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*rowid -> XXX*/ @@ -14010,6 +14286,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*lob -> XXX*/ @@ -14040,6 +14318,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*json -> XXX*/ @@ -14070,6 +14350,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ json_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*geometry -> XXX*/ @@ -14100,6 +14382,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected, /*udt*/ geometry_decimalint,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*udt -> XXX*/ @@ -14130,6 +14414,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected, /*decimal int*/ cast_not_expected,/*collection*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*decimalint -> XXX*/ @@ -14160,6 +14446,8 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ decimalint_decimalint, /*decimal int*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, { /*collection -> XXX*/ @@ -14190,6 +14478,72 @@ ObExpr::EvalFunc OB_DATUM_CAST_MYSQL_IMPLICIT[ObMaxTC][ObMaxTC] = cast_not_expected,/*udt, not implemented in mysql mode*/ cast_not_expected,/*decimalint*/ cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql date -> XXX*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected,/*udt, not implemented in mysql mode*/ + cast_not_expected,/*decimalint, place_holder*/ + cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ + }, + { + /*mysql datetime -> XXX*/ + cast_not_expected,/*null*/ + cast_not_expected,/*int*/ + cast_not_expected,/*uint*/ + cast_not_expected,/*float*/ + cast_not_expected,/*double*/ + cast_not_expected,/*number*/ + cast_not_expected,/*datetime*/ + cast_not_expected,/*date*/ + cast_not_expected,/*time*/ + cast_not_expected,/*year*/ + cast_not_expected,/*string*/ + cast_not_expected,/*extend*/ + cast_not_expected,/*unknown*/ + cast_not_expected,/*text*/ + cast_not_expected,/*bit*/ + cast_not_expected,/*enumset*/ + cast_not_expected,/*enumset_inner*/ + cast_not_expected,/*otimestamp*/ + cast_not_expected,/*raw*/ + cast_not_expected,/*interval*/ + cast_not_expected,/*rowid*/ + cast_not_expected,/*lob*/ + cast_not_expected,/*json*/ + cast_not_expected,/*geometry*/ + cast_not_expected,/*udt, not implemented in mysql mode*/ + cast_not_expected,/*decimalint, place_holder*/ + cast_not_expected,/*collection, not implemented in mysql mode*/ + cast_not_expected,/*mysql date*/ + cast_not_expected,/*mysql datetime*/ }, }; @@ -14330,6 +14684,16 @@ ObExpr::EvalEnumSetFunc OB_DATUM_CAST_MYSQL_ENUMSET_IMPLICIT[ObMaxTC][2] = cast_not_support_enum_set,/*enum*/ cast_not_support_enum_set,/*set*/ }, + { + /*ObMySQLDate -> enum_or_set*/ + cast_not_support_enum_set,/*enum*/ + cast_not_support_enum_set,/*set*/ + }, + { + /*ObMySQLDateTime -> enum_or_set*/ + cast_not_support_enum_set,/*enum*/ + cast_not_support_enum_set,/*set*/ + }, }; int string_collation_check(const bool is_strict_mode, diff --git a/src/sql/engine/expr/ob_expr_abs_result_type.map b/src/sql/engine/expr/ob_expr_abs_result_type.map index e146bafe8..95a628172 100644 --- a/src/sql/engine/expr/ob_expr_abs_result_type.map +++ b/src/sql/engine/expr/ob_expr_abs_result_type.map @@ -52,6 +52,8 @@ static constexpr ObObjType ABS_RESULT_TYPE[ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }; @@ -109,6 +111,8 @@ static constexpr ObObjType ABS_RESULT_TYPE_ORACLE[ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }; static_assert(is_array_fully_initialized(ABS_RESULT_TYPE_ORACLE), "ABS_RESULT_TYPE_ORACLE is partially initlized"); diff --git a/src/sql/engine/expr/ob_expr_arithmetic_result_type.map b/src/sql/engine/expr/ob_expr_arithmetic_result_type.map index 883190ffd..2c6c3418a 100644 --- a/src/sql/engine/expr/ob_expr_arithmetic_result_type.map +++ b/src/sql/engine/expr/ob_expr_arithmetic_result_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -110,6 +112,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -166,6 +170,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -222,6 +228,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -278,6 +286,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -334,6 +344,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -390,6 +402,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -446,6 +460,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -502,6 +518,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -558,6 +576,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UInt64Type*/ @@ -614,6 +634,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -670,6 +692,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -726,6 +750,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -782,6 +808,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -838,6 +866,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -894,6 +924,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -950,6 +982,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1006,6 +1040,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1062,6 +1098,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1118,6 +1156,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1174,6 +1214,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1230,6 +1272,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1286,6 +1330,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1342,6 +1388,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1398,6 +1446,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1454,6 +1504,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1510,6 +1562,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -1565,6 +1619,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -1620,6 +1676,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObMediumTextType*/ { @@ -1675,6 +1733,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObLongTextType*/ { @@ -1730,6 +1790,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1785,6 +1847,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObUInt64Type, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1840,6 +1904,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1895,6 +1961,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1950,6 +2018,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2005,6 +2075,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2060,6 +2132,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2115,6 +2189,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /* ObTimestampNanoType*/ { @@ -2170,6 +2246,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2225,6 +2303,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2280,6 +2360,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2335,6 +2417,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ { @@ -2390,6 +2474,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2445,6 +2531,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -2500,6 +2588,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2555,6 +2645,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2610,6 +2702,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2665,6 +2759,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2720,6 +2816,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSqlType*/ { @@ -2775,6 +2873,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2830,6 +2930,8 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObCollectionSqlType*/ { @@ -2885,6 +2987,122 @@ static constexpr ObObjType ARITH_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSqlType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObDoubleType, /* NullType */ + ObIntType, /* TinyIntType */ + ObIntType, /* SmallIntType */ + ObIntType, /* MediumIntType */ + ObIntType, /* Int32Type */ + ObIntType, /* IntType */ + ObUInt64Type, /* UTinyIntType */ + ObUInt64Type, /* USmallIntType */ + ObUInt64Type, /* UMediumIntType */ + ObUInt64Type, /* UInt32Type */ + ObUInt64Type, /* UInt64Type */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObIntType, /* DateType */ + ObNumberType, /* TimeType */ + ObUInt64Type, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObDoubleType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /* ObTinyTextType */ + ObDoubleType, /* ObTextType */ + ObDoubleType, /* ObMediumTextType */ + ObDoubleType, /* ObLongTextType */ + ObUInt64Type, /* ObBitType */ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /* ObTimestampTZType */ + ObNumberType, /* ObTimestampLTZType */ + ObNumberType, /* ObTimestampNanoType */ + ObNumberType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSqlType */ + ObNumberType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObDoubleType, /* NullType */ + ObNumberType, /* TinyIntType */ + ObNumberType, /* SmallIntType */ + ObNumberType, /* MediumIntType */ + ObNumberType, /* Int32Type */ + ObNumberType, /* IntType */ + ObNumberType, /* UTinyIntType */ + ObNumberType, /* USmallIntType */ + ObNumberType, /* UMediumIntType */ + ObNumberType, /* UInt32Type */ + ObNumberType, /* UInt64Type */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObNumberType, /* DateType */ + ObNumberType, /* TimeType */ + ObNumberType, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObDoubleType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /* ObTinyTextType */ + ObDoubleType, /* ObTextType */ + ObDoubleType, /* ObMediumTextType */ + ObDoubleType, /* ObLongTextType */ + ObNumberType, /* ObBitType*/ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /* ObTimestampTZType */ + ObNumberType, /* ObTimestampLTZType */ + ObNumberType, /* ObTimestampNanoType */ + ObNumberType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSqlType */ + ObNumberType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_cast.h b/src/sql/engine/expr/ob_expr_cast.h index 615c04fd4..46117b9ed 100644 --- a/src/sql/engine/expr/ob_expr_cast.h +++ b/src/sql/engine/expr/ob_expr_cast.h @@ -28,7 +28,7 @@ namespace sql { // The length of array need to be equal to the number of types defined at ObObjType -static const int32_t CAST_STRING_DEFUALT_LENGTH[53] = { +static const int32_t CAST_STRING_DEFUALT_LENGTH[ObMaxType + 1] = { 0, //null 4, //tinyint 6, //smallint @@ -81,6 +81,8 @@ static const int32_t CAST_STRING_DEFUALT_LENGTH[53] = { 1,//udt 11, // decimal int 1,//collection + 10,//mysql date + 19,//mysql datetime 0//max, invalid type, or count of obj type }; diff --git a/src/sql/engine/expr/ob_expr_div_result_type.map b/src/sql/engine/expr/ob_expr_div_result_type.map index 625c8bd08..6369475ce 100644 --- a/src/sql/engine/expr/ob_expr_div_result_type.map +++ b/src/sql/engine/expr/ob_expr_div_result_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -110,6 +112,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -166,6 +170,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -222,6 +228,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -278,6 +286,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -334,6 +344,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -390,6 +402,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -446,6 +460,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -502,6 +518,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -558,6 +576,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UIntType*/ @@ -614,6 +634,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -670,6 +692,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -726,6 +750,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -782,6 +808,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -838,6 +866,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -894,6 +924,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -950,6 +982,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1006,6 +1040,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1062,6 +1098,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1118,6 +1156,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1174,6 +1214,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1230,6 +1272,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1286,6 +1330,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1342,6 +1388,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1398,6 +1446,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1454,6 +1504,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1510,6 +1562,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -1565,6 +1619,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -1620,6 +1676,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObMediumTextType*/ { @@ -1675,6 +1733,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObLongTextType*/ { @@ -1730,6 +1790,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1785,6 +1847,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1840,6 +1904,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1895,6 +1961,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1950,6 +2018,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2005,6 +2075,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2060,6 +2132,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2115,6 +2189,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2170,6 +2246,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2225,6 +2303,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2280,6 +2360,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2335,6 +2417,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ { @@ -2390,6 +2474,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2445,6 +2531,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -2500,6 +2588,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2555,6 +2645,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2610,6 +2702,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2665,6 +2759,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2720,6 +2816,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2775,6 +2873,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2830,6 +2930,8 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2885,6 +2987,122 @@ static constexpr ObObjType DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObDoubleType, /* NullType */ + ObNumberType, /* TinyIntType */ + ObNumberType, /* SmallIntType */ + ObNumberType, /* MediumIntType */ + ObNumberType, /* Int32Type */ + ObNumberType, /* IntType */ + ObNumberType, /* UTinyIntType */ + ObNumberType, /* USmallIntType */ + ObNumberType, /* UMediumIntType */ + ObNumberType, /* UInt32Type */ + ObNumberType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObNumberType, /* DateType */ + ObNumberType, /* TimeType */ + ObNumberType, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObNumberType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /* ObTinyTextType */ + ObDoubleType, /* ObTextType */ + ObDoubleType, /* ObMediumTextType */ + ObDoubleType, /* ObLongTextType */ + ObNumberType, /* BitType */ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /*ObTimestampTZType */ + ObNumberType, /*ObTimestampLTZType */ + ObNumberType, /*ObTimestampNanoType */ + ObNumberType, /*ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType*/ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObDoubleType, /* NullType */ + ObNumberType, /* TinyIntType */ + ObNumberType, /* SmallIntType */ + ObNumberType, /* MediumIntType */ + ObNumberType, /* Int32Type */ + ObNumberType, /* IntType */ + ObNumberType, /* UTinyIntType */ + ObNumberType, /* USmallIntType */ + ObNumberType, /* UMediumIntType */ + ObNumberType, /* UInt32Type */ + ObNumberType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObNumberType, /* DateType */ + ObNumberType, /* TimeType */ + ObNumberType, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObNumberType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /* ObTinyTextType */ + ObDoubleType, /* ObTextType */ + ObDoubleType, /* ObMediumTextType */ + ObDoubleType, /* ObLongTextType */ + ObNumberType, /* BitType */ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /*ObTimestampTZType */ + ObNumberType, /*ObTimestampLTZType */ + ObNumberType, /*ObTimestampNanoType */ + ObNumberType, /*ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType*/ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_int_div_result_type.map b/src/sql/engine/expr/ob_expr_int_div_result_type.map index 16c233e62..f3129b84d 100644 --- a/src/sql/engine/expr/ob_expr_int_div_result_type.map +++ b/src/sql/engine/expr/ob_expr_int_div_result_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -110,6 +112,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -166,6 +170,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -222,6 +228,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -278,6 +286,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -334,6 +344,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -390,6 +402,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -446,6 +460,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -502,6 +518,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -558,6 +576,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*UInt64Type*/ @@ -614,6 +634,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -670,6 +692,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -726,6 +750,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -782,6 +808,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -838,6 +866,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -894,6 +924,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -950,6 +982,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1006,6 +1040,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1062,6 +1098,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1118,6 +1156,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1174,6 +1214,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1230,6 +1272,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1286,6 +1330,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1342,6 +1388,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1398,6 +1446,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1454,6 +1504,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1510,6 +1562,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -1565,6 +1619,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -1620,6 +1676,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObMediumTextType*/ { @@ -1675,6 +1733,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObLongTextType*/ { @@ -1730,6 +1790,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1785,6 +1847,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1840,6 +1904,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1895,6 +1961,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObUInt64Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUInt64Type, /* ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1950,6 +2018,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2005,6 +2075,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObTimestampTZType*/ { @@ -2060,6 +2132,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /* ObTimestampLTZType*/ { @@ -2115,6 +2189,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /* ObTimestampNanoType*/ { @@ -2170,6 +2246,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /* ObRawType*/ { @@ -2225,6 +2303,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*IntervalYMType*/ { @@ -2280,6 +2360,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*IntervalDSType*/ { @@ -2335,6 +2417,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ { @@ -2390,6 +2474,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2445,6 +2531,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -2500,6 +2588,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2555,6 +2645,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2610,6 +2702,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2666,6 +2760,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2721,6 +2817,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2776,6 +2874,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2831,6 +2931,8 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2886,7 +2988,123 @@ static constexpr ObObjType INT_DIV_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ - } + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObIntType, /* NullType */ + ObIntType, /* TinyIntType */ + ObIntType, /* SmallIntType */ + ObIntType, /* MediumIntType */ + ObIntType, /* Int32Type */ + ObIntType, /* IntType */ + ObUInt64Type, /* UTinyIntType */ + ObUInt64Type, /* USmallIntType */ + ObUInt64Type, /* UMediumIntType */ + ObUInt64Type, /* UInt32Type */ + ObUInt64Type, /* UInt64Type */ + ObIntType, /* FloatType */ + ObIntType, /* DoubleType */ + ObUInt64Type, /* UFloatType */ + ObUInt64Type, /* UDoubleType */ + ObIntType, /* NumberType */ + ObUInt64Type, /* UNumberType */ + ObIntType, /* DateTimeType */ + ObIntType, /* TimestampType */ + ObIntType, /* DateType */ + ObIntType, /* TimeType */ + ObUInt64Type, /* YearType */ + ObIntType, /* VarcharType */ + ObIntType, /* CharType */ + ObUInt64Type, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObIntType, /* UnknownType */ + ObIntType, /* ObTinyTextType */ + ObIntType, /* ObTextType */ + ObIntType, /* ObMediumTextType */ + ObIntType, /* ObLongTextType */ + ObUInt64Type, /* BitType */ + ObUInt64Type, /* ObEnumType */ + ObUInt64Type, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObIntType, /* ObTimestampTZType */ + ObIntType, /* ObTimestampLTZType */ + ObIntType, /* ObTimestampNanoType */ + ObIntType, /* ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObIntType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType*/ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObIntType, /* NullType */ + ObIntType, /* TinyIntType */ + ObIntType, /* SmallIntType */ + ObIntType, /* MediumIntType */ + ObIntType, /* Int32Type */ + ObIntType, /* IntType */ + ObUInt64Type, /* UTinyIntType */ + ObUInt64Type, /* USmallIntType */ + ObUInt64Type, /* UMediumIntType */ + ObUInt64Type, /* UInt32Type */ + ObUInt64Type, /* UInt64Type */ + ObIntType, /* FloatType */ + ObIntType, /* DoubleType */ + ObUInt64Type, /* UFloatType */ + ObUInt64Type, /* UDoubleType */ + ObIntType, /* NumberType */ + ObUInt64Type, /* UNumberType */ + ObIntType, /* DateTimeType */ + ObIntType, /* TimestampType */ + ObIntType, /* DateType */ + ObIntType, /* TimeType */ + ObUInt64Type, /* YearType */ + ObIntType, /* VarcharType */ + ObIntType, /* CharType */ + ObUInt64Type, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObIntType, /* UnknownType */ + ObIntType, /* ObTinyTextType */ + ObIntType, /* ObTextType */ + ObIntType, /* ObMediumTextType */ + ObIntType, /* ObLongTextType */ + ObUInt64Type, /* BitType */ + ObUInt64Type, /* ObEnumType */ + ObUInt64Type, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObIntType, /* ObTimestampTZType */ + ObIntType, /* ObTimestampLTZType */ + ObIntType, /* ObTimestampNanoType */ + ObIntType, /* ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObIntType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType*/ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ + }, }; static_assert(is_array_fully_initialized(INT_DIV_RESULT_TYPE, ObMaxType), "INT_DIV_RESULT_TYPE is partially initlized"); \ No newline at end of file diff --git a/src/sql/engine/expr/ob_expr_merge_result_type_oracle.map b/src/sql/engine/expr/ob_expr_merge_result_type_oracle.map index db47a1cd7..08d18da97 100644 --- a/src/sql/engine/expr/ob_expr_merge_result_type_oracle.map +++ b/src/sql/engine/expr/ob_expr_merge_result_type_oracle.map @@ -53,6 +53,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType,/*NullType=>ObUserDefinedSQLType*/ ObDecimalIntType, /*NullType=>ObDecimalIntType*/ ObCollectionSQLType, /* NullType=>ObCollectionSQLType*/ + ObMySQLDateType, /*NullType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*NullType=>ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -109,6 +111,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*TinyInt=>ObUserDefinedSQLType*/ ObDecimalIntType, /*TinyInt=>ObDecimalIntType*/ ObMaxType, /* TinyInt=>ObCollectionSQLType*/ + ObVarcharType, /*TinyIntType=>ObMySQLDateType */ + ObVarcharType, /*TinyIntType=>ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -165,6 +169,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*SmallInt=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*SmallInt=>ObCollectionSQLType*/ + ObVarcharType, /*SmallInt=>ObMySQLDateType */ + ObVarcharType, /*SmallInt=>ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -221,6 +227,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*MediumInt=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*MediumInt=>ObCollectionSQLType*/ + ObVarcharType, /*MediumInt=>ObMySQLDateType */ + ObVarcharType, /*MediumInt=>ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -277,6 +285,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*Int32Type=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*Int32Type=>ObCollectionSQLType*/ + ObVarcharType, /*Int32Type=>ObMySQLDateType */ + ObVarcharType, /*Int32Type=>ObMySQLDateTimeType */ }, /*IntType*/ @@ -333,6 +343,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*IntType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*IntType=>ObCollectionSQLType*/ + ObVarcharType, /*IntType=>ObMySQLDateType */ + ObVarcharType, /*IntType=>ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -389,6 +401,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UTinyIntType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*UTinyIntType=>ObCollectionSQLType*/ + ObVarcharType, /*UTinyIntType=>ObMySQLDateType */ + ObVarcharType, /*UTinyIntType=>ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -445,6 +459,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*USmallIntType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*USmallIntType=>ObCollectionSQLType*/ + ObVarcharType, /*USmallIntType=>ObMySQLDateType */ + ObVarcharType, /*USmallIntType=>ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -501,6 +517,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UMediumIntType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*UMediumIntType=>ObCollectionSQLType*/ + ObVarcharType, /*UMediumIntType=>ObMySQLDateType */ + ObVarcharType, /*UMediumIntType=>ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -557,6 +575,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UInt32Type=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*UInt32Type=>ObCollectionSQLType*/ + ObVarcharType, /*UInt32Type=>ObMySQLDateType */ + ObVarcharType, /*UInt32Type=>ObMySQLDateTimeType */ }, /*UIntType*/ @@ -613,6 +633,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UIntType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*UIntType=>ObCollectionSQLType*/ + ObVarcharType, /*UIntType=>ObMySQLDateType */ + ObVarcharType, /*UIntType=>ObMySQLDateTimeType */ }, /*FloatType*/ @@ -669,6 +691,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*FloatType=>ObUserDefinedSQLType*/ ObDoubleType, ObMaxType, /*FloatType=>ObCollectionSQLType*/ + ObVarcharType, /*FloatType=>ObMySQLDateType */ + ObVarcharType, /*FloatType=>ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -725,6 +749,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*DoubleTYpe=>ObUserDefinedSQLType*/ ObDoubleType, ObMaxType, /*DoubleTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*DoubleType=>ObMySQLDateType */ + ObVarcharType, /*DoubleType=>ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -781,6 +807,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UFloatTYpe=>ObUserDefinedSQLType*/ ObDoubleType, ObMaxType, /*UFloatTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*UFloatType=>ObMySQLDateType */ + ObVarcharType, /*UFloatType=>ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -837,6 +865,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UDoubleTYpe=>ObUserDefinedSQLType*/ ObDoubleType, ObMaxType, /*UDoubleTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*UDoubleType=>ObMySQLDateType */ + ObVarcharType, /*UDoubleType=>ObMySQLDateTimeType */ }, /*NumberType*/ @@ -893,6 +923,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*NumberTYpe=>ObUserDefinedSQLType*/ ObNumberType, ObMaxType, /*NumberTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*NumberType=>ObMySQLDateType */ + ObVarcharType, /*NumberType=>ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -949,6 +981,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UNumberTYpe=>ObUserDefinedSQLType*/ ObNumberType, ObMaxType, /*UNumberTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*UNumberType=>ObMySQLDateType */ + ObVarcharType, /*UNumberType=>ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1005,6 +1039,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*DateTimeTYpe=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*DateTimeTYpe=>ObCollectionSQLType*/ + ObMySQLDateTimeType, /*DateTimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*DateTimeType=>ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1061,6 +1097,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*TimestampTYpe=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*TimestampTYpe=>ObCollectionSQLType*/ + ObMySQLDateTimeType, /*TimestampType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*TimestampType=>ObMySQLDateTimeType */ }, /*DateType*/ @@ -1117,6 +1155,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*DateTYpe=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*DateTYpe=>ObCollectionSQLType*/ + ObMySQLDateType, /*DateType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*DateType=>ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1173,6 +1213,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*TimeTYpe=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*TimeTYpe=>ObCollectionSQLType*/ + ObMySQLDateTimeType, /*TimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*TimeType=>ObMySQLDateTimeType */ }, /*YearType*/ @@ -1229,6 +1271,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*YearTYpe=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*YearTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*YearType=>ObMySQLDateType */ + ObVarcharType, /*YearType=>ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1285,6 +1329,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*VarcharTYpe=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*VarcharTYpe=>ObCollectionSQLType*/ + ObVarcharType, /*VarcharType=>ObMySQLDateType */ + ObVarcharType, /*VarcharType=>ObMySQLDateTimeType */ }, /*CharType*/ @@ -1341,6 +1387,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*CharType=>ObUserDefinedSQLType*/ ObCharType, ObMaxType, /*CharType=>ObCollectionSQLType*/ + ObCharType, /*CharType=>ObMySQLDateType */ + ObCharType, /*CharType=>ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1397,6 +1445,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*HexStringType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*HexStringType=>ObCollectionSQLType*/ + ObVarcharType, /*HexStringType=>ObMySQLDateType */ + ObVarcharType, /*HexStringType=>ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1453,6 +1503,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType, /*ExtendType=>ObUserDefinedSQLType*/ ObMaxType, ObCollectionSQLType, /*ExtendType=>ObCollectionSQLType*/ + ObMaxType, /*ExtendType=>ObMySQLDateType */ + ObMaxType, /*ExtendType=>ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1509,6 +1561,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*UnknownType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*UnknownType=>ObCollectionSQLType*/ + ObVarcharType, /*UnknownType=>ObMySQLDateType */ + ObVarcharType, /*UnknownType=>ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -1564,6 +1618,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTinyTextType=>ObUserDefinedSQLType*/ ObTinyTextType, ObMaxType, /*ObTinyTextType=>ObCollectionSQLType*/ + ObTinyTextType, /*ObTinyTextType=>ObMySQLDateType */ + ObTinyTextType, /*ObTinyTextType=>ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -1619,6 +1675,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTextType=>ObUserDefinedSQLType*/ ObTextType, ObMaxType, /*ObTextType=>ObCollectionSQLType*/ + ObTextType, /*ObTextType=>ObMySQLDateType */ + ObTextType, /*ObTextType=>ObMySQLDateTimeType */ }, /*ObMediumTextType*/ @@ -1675,6 +1733,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObMediumTextType=>ObUserDefinedSQLType*/ ObMediumTextType, ObMaxType, /*ObMediumTextType=>ObCollectionSQLType*/ + ObMediumTextType, /*ObMediumTextType=>ObMySQLDateType */ + ObMediumTextType, /*ObMediumTextType=>ObMySQLDateTimeType */ }, /*ObLongTextType*/ @@ -1731,6 +1791,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObLongTextType=>ObUserDefinedSQLType*/ ObLongTextType, ObMaxType, /*ObLongTextType=>ObCollectionSQLType*/ + ObLongTextType, /*ObLongTextType=>ObMySQLDateType */ + ObLongTextType, /*ObLongTextType=>ObMySQLDateTimeType */ }, /*ObBitType*/ { @@ -1786,6 +1848,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObBitType=>ObUserDefinedSQLType*/ ObDecimalIntType, ObMaxType, /*ObBitType=>ObCollectionSQLType*/ + ObVarcharType, /*ObBitType=>ObMySQLDateType */ + ObVarcharType, /*ObBitType=>ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1841,6 +1905,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObEnumType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObEnumType=>ObCollectionSQLType*/ + ObVarcharType, /*ObEnumType=>ObMySQLDateType */ + ObVarcharType, /*ObEnumType=>ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1896,6 +1962,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObSetType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObSetType=>ObCollectionSQLType*/ + ObVarcharType, /*ObSetType=>ObMySQLDateType */ + ObVarcharType, /*ObSetType=>ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1951,6 +2019,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObEnumInnerType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObEnumInnerType=>ObCollectionSQLType*/ + ObVarcharType, /*ObEnumInnerType=>ObMySQLDateType */ + ObVarcharType, /*ObEnumInnerType=>ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2006,6 +2076,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObSetInnerType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObSetInnerType=>ObCollectionSQLType*/ + ObVarcharType, /*ObSetInnerType=>ObMySQLDateType */ + ObVarcharType, /*ObSetInnerType=>ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2061,6 +2133,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampTZType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObTimestampTZType=>ObCollectionSQLType*/ + ObTimestampTZType, /*ObTimestampTZType=>ObMySQLDateType */ + ObTimestampTZType, /*ObTimestampTZType=>ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2116,6 +2190,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampLTZType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObTimestampLTZType=>ObCollectionSQLType*/ + ObTimestampLTZType, /*ObTimestampLTZType=>ObMySQLDateType */ + ObTimestampLTZType, /*ObTimestampLTZType=>ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2171,6 +2247,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampNanoType=>ObUserDefinedSQLType*/ ObVarcharType, ObMaxType, /*ObTimestampNanoType=>ObCollectionSQLType*/ + ObTimestampNanoType, /*ObTimestampNanoType=>ObMySQLDateType */ + ObTimestampNanoType, /*ObTimestampNanoType=>ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2226,6 +2304,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObRawType=>ObUserDefinedSQLType*/ ObRawType, ObMaxType, /*ObRawType=>ObCollectionSQLType*/ + ObRawType, /*ObRawType=>ObMySQLDateType */ + ObRawType, /*ObRawType=>ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2281,6 +2361,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObIntervalYMType=>ObUserDefinedSQLType*/ ObIntervalYMType, ObMaxType, /*ObIntervalYMType=>ObCollectionSQLType*/ + ObIntervalYMType, /*ObIntervalYMType=>ObMySQLDateType */ + ObIntervalYMType, /*ObIntervalYMType=>ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2336,6 +2418,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObIntervalDSType=>ObUserDefinedSQLType*/ ObIntervalDSType, ObMaxType, /*ObIntervalDSType=>ObCollectionSQLType*/ + ObIntervalDSType, /*ObIntervalDSType=>ObMySQLDateType */ + ObMaxType, /*ObIntervalDSType=>ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ @@ -2392,6 +2476,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*NumberFloatType=>ObUserDefinedSQLType*/ ObNumberType, ObMaxType, /*NumberFloatType=>ObCollectionSQLType*/ + ObVarcharType, /*NumberFloatType=>ObMySQLDateType */ + ObVarcharType, /*NumberFloatType=>ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2447,6 +2533,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObNVarchar2Type=>ObUserDefinedSQLType*/ ObNVarchar2Type, ObMaxType, /*ObNVarchar2Type=>ObCollectionSQLType*/ + ObNVarchar2Type, /*ObNVarchar2Type=>ObMySQLDateType */ + ObNVarchar2Type, /*ObNVarchar2Type=>ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -2502,6 +2590,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObNCharType=>ObUserDefinedSQLType*/ ObNCharType, ObMaxType, /*ObNCharType=>ObCollectionSQLType*/ + ObNCharType, /*ObNCharType=>ObMySQLDateType */ + ObNCharType, /*ObNCharType=>ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2557,6 +2647,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObURowIDType=>ObUserDefinedSQLType*/ ObMaxType, ObMaxType, /*ObURowIDType=>ObCollectionSQLType*/ + ObMaxType, /*ObURowIDType=>ObMySQLDateType */ + ObMaxType, /*ObURowIDType=>ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2612,6 +2704,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /* ObLobType=>ObUserDefinedSQLType*/ ObMaxType, ObMaxType, /* ObLobType=>ObCollectionSQLType*/ + ObMaxType, /*ObLobType=>ObMySQLDateType */ + ObMaxType, /*ObLobType=>ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2667,6 +2761,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /*ObJsonType=>ObUserDefinedSQLType*/ ObJsonType, ObMaxType, /*ObJsonType=>ObCollectionSQLType*/ + ObJsonType, /*ObJsonType=>ObMySQLDateType */ + ObJsonType, /*ObJsonType=>ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2722,6 +2818,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /* ObGeometryType=>ObUserDefinedSQLType*/ ObGeometryType, ObMaxType, /* ObGeometryType=>ObCollectionSQLType*/ + ObGeometryType, /*ObGeometryType=>ObMySQLDateType */ + ObGeometryType, /*ObGeometryType=>ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2777,6 +2875,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType, /*ObUserDefinedSQLType*/ ObMaxType, ObMaxType, /* ObUserDefinedSQLType=>ObCollectionSQLType*/ + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateType */ + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2832,6 +2932,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /* ObDecimalIntType=>ObUserDefinedSqlType */ ObDecimalIntType, /*ObDecimalIntType=>ObDecimalIntType */ ObMaxType, /* ObDecimalIntType=>ObCollectionSQLType */ + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateType */ + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2887,6 +2989,122 @@ static constexpr ObObjType MERGE_RESULT_TYPE[ObMaxType][ObMaxType] = { ObMaxType, /* ObCollectionSQLType=>ObUserDefinedSQLType*/ ObMaxType, /* ObCollectionSQLType=>ObDecimalIntType */ ObCollectionSQLType, /* ObCollectionSQLType */ + ObMaxType, /* ObCollectionSQLType=>ObMySQLDateType */ + ObMaxType, /* ObCollectionSQLType=>ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObMySQLDateType, /*ObMySQLDateType=>NullType */ + ObVarcharType, /*ObMySQLDateType=>TinyIntType */ + ObVarcharType, /*ObMySQLDateType=>SmallIntType */ + ObVarcharType, /*ObMySQLDateType=>MediumIntType */ + ObVarcharType, /*ObMySQLDateType=>Int32Type */ + ObVarcharType, /*ObMySQLDateType=>IntType */ + ObVarcharType, /*ObMySQLDateType=>UTinyIntType */ + ObVarcharType, /*ObMySQLDateType=>USmallIntType */ + ObVarcharType, /*ObMySQLDateType=>UMediumIntType */ + ObVarcharType, /*ObMySQLDateType=>UInt32Type */ + ObVarcharType, /*ObMySQLDateType=>UIntType */ + ObVarcharType, /*ObMySQLDateType=>FloatType */ + ObVarcharType, /*ObMySQLDateType=>DoubleType */ + ObVarcharType, /*ObMySQLDateType=>UFloatType */ + ObVarcharType, /*ObMySQLDateType=>UDoubleType */ + ObVarcharType, /*ObMySQLDateType=>NumberType */ + ObVarcharType, /*ObMySQLDateType=>UNumberType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>DateTimeType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>TimestampType */ + ObMySQLDateType, /*ObMySQLDateType=>DateType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>TimeType */ + ObVarcharType, /*ObMySQLDateType=>YearType */ + ObVarcharType, /*ObMySQLDateType=>VarcharType */ + ObCharType, /*ObMySQLDateType=>CharType */ + ObVarcharType, /*ObMySQLDateType=>HexStringType */ + ObMaxType, /*ObMySQLDateType=>ExtendType */ + ObVarcharType, /*ObMySQLDateType=>UnknownType */ + ObTinyTextType, /*ObMySQLDateType=>ObTinyTextType */ + ObTextType, /* ObMySQLDateType=>ObTextType */ + ObMediumTextType, /* ObMySQLDateType=>ObMediumTextType */ + ObLongTextType, /* ObMySQLDateType=>ObLongTextType */ + ObVarcharType, /* ObMySQLDateType=>ObBitType */ + ObVarcharType, /* ObMySQLDateType=>ObEnumType */ + ObVarcharType, /* ObMySQLDateType=>ObSetType */ + ObMaxType, /* ObMySQLDateType=>ObEnumInnerType */ + ObMaxType, /* ObMySQLDateType=>ObSetInnerType */ + ObTimestampTZType, /*ObMySQLDateType=>ObTimestampTZType */ + ObTimestampLTZType, /*ObMySQLDateType=>ObTimestampLTZType */ + ObTimestampNanoType, /*ObMySQLDateType=>ObTimestampNanoType */ + ObRawType, /*ObMySQLDateType=>ObRawType */ + ObMaxType, /*ObMySQLDateType=>ObIntervalYMType */ + ObMaxType, /*ObMySQLDateType=>ObIntervalDSType */ + ObMaxType, /*ObMySQLDateType=>ObNumberFloatType */ + ObNVarchar2Type, /*ObMySQLDateType=>ObNVarchar2Type */ + ObNCharType, /*ObMySQLDateType=>ObNCharType */ + ObMaxType, /*ObMySQLDateType=>URowIDType*/ + ObMaxType, /*ObMySQLDateType=>ObLobType*/ + ObJsonType, /*ObMySQLDateType=>ObJsonType*/ + ObGeometryType, /*ObMySQLDateType=>ObGeometryType*/ + ObMaxType, /*ObMySQLDateType=>ObUserDefinedSQLType*/ + ObMaxType, /*ObMySQLDateType=>ObDecimalIntType*/ + ObMaxType, /*ObMySQLDateType=>ObCollectionSQLType*/ + ObMySQLDateType, /*ObMySQLDateType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>NullType */ + ObVarcharType, /*ObMySQLDateTimeType=>TinyIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>SmallIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>MediumIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>Int32Type */ + ObVarcharType, /*ObMySQLDateTimeType=>IntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UTinyIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>USmallIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UMediumIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UInt32Type */ + ObVarcharType, /*ObMySQLDateTimeType=>UIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>FloatType */ + ObVarcharType, /*ObMySQLDateTimeType=>DoubleType */ + ObVarcharType, /*ObMySQLDateTimeType=>UFloatType */ + ObVarcharType, /*ObMySQLDateTimeType=>UDoubleType */ + ObVarcharType, /*ObMySQLDateTimeType=>NumberType */ + ObVarcharType, /*ObMySQLDateTimeType=>UNumberType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>DateTimeType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>TimestampType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>DateType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>TimeType */ + ObVarcharType, /*ObMySQLDateTimeType=>YearType */ + ObVarcharType, /*ObMySQLDateTimeType=>VarcharType */ + ObCharType, /*ObMySQLDateTimeType=>CharType */ + ObVarcharType, /*ObMySQLDateTimeType=>HexStringType */ + ObMaxType, /*ObMySQLDateTimeType=>ExtendType */ + ObVarcharType, /*ObMySQLDateTimeType=>UnknownType */ + ObTinyTextType, /*ObMySQLDateTimeType=>ObTinyTextType */ + ObTextType, /* ObMySQLDateTimeType=>ObTextType */ + ObMediumTextType, /* ObMySQLDateTimeType=>ObMediumTextType */ + ObLongTextType, /* ObMySQLDateTimeType=>ObLongTextType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObBitType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObEnumType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObSetType */ + ObMaxType, /* ObMySQLDateTimeType=>ObEnumInnerType */ + ObMaxType, /* ObMySQLDateTimeType=>ObSetInnerType */ + ObTimestampTZType, /*ObMySQLDateTimeType=>ObTimestampTZType */ + ObTimestampLTZType, /*ObMySQLDateTimeType=>ObTimestampLTZType */ + ObTimestampNanoType, /*ObMySQLDateTimeType=>ObTimestampNanoType */ + ObRawType, /*ObMySQLDateTimeType=>ObRawType */ + ObMaxType, /*ObMySQLDateTimeType=>ObIntervalYMType */ + ObMaxType, /*ObMySQLDateTimeType=>ObIntervalDSType */ + ObMaxType, /*ObMySQLDateTimeType=>ObNumberFloatType */ + ObNVarchar2Type, /*ObMySQLDateTimeType=>ObNVarchar2Type */ + ObNCharType, /*ObMySQLDateTimeType=>ObNCharType */ + ObMaxType, /*ObMySQLDateTimeType=>URowIDType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObLobType*/ + ObJsonType, /*ObMySQLDateTimeType=>ObJsonType*/ + ObGeometryType, /*ObMySQLDateTimeType=>ObGeometryType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObUserDefinedSQLType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObDecimalIntType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObCollectionSQLType*/ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>ObMySQLDateTimeType */ }, }; @@ -2945,6 +3163,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType,/*NullType=>ObUserDefinedSQLType*/ ObNumberType, /*NullType=>ObDecimalIntType */ ObCollectionSQLType, /* NullType=>ObCollectionSQLType*/ + ObMySQLDateType, /*NullType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*NullType=>ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -3001,6 +3221,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*TinyInt=>ObUserDefinedSQLType*/ ObNumberType, /*TinyInt=>ObDecimalIntType */ ObMaxType, /* TinyInt=>ObCollectionSQLType*/ + ObVarcharType, /*TinyIntType=>ObMySQLDateType */ + ObVarcharType, /*TinyIntType=>ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -3057,6 +3279,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*SmallInt=>ObUserDefinedSQLType*/ ObNumberType, /*SmallIntType=>ObDecimalIntType */ ObMaxType, /*SmallInt=>ObCollectionSQLType*/ + ObVarcharType, /*SmallInt=>ObMySQLDateType */ + ObVarcharType, /*SmallInt=>ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -3113,6 +3337,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*MediumInt=>ObUserDefinedSQLType*/ ObNumberType, /*MediumIntType=>ObDecimalIntType */ ObMaxType, /*MediumInt=>ObCollectionSQLType*/ + ObVarcharType, /*MediumInt=>ObMySQLDateType */ + ObVarcharType, /*MediumInt=>ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -3169,6 +3395,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*Int32Type=>ObUserDefinedSQLType*/ ObNumberType, /*Int32Type=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*Int32Type=>ObMySQLDateType */ + ObVarcharType, /*Int32Type=>ObMySQLDateTimeType */ }, /*IntType*/ @@ -3225,6 +3453,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*IntType=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, /*IntType=>ObCollectionSQLType*/ + ObVarcharType, /*IntType=>ObMySQLDateType */ + ObVarcharType, /*IntType=>ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -3281,6 +3511,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UTinyIntType=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UTinyIntType=>ObMySQLDateType */ + ObVarcharType, /*UTinyIntType=>ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -3337,6 +3569,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*USmallIntType=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*USmallIntType=>ObMySQLDateType */ + ObVarcharType, /*USmallIntType=>ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -3393,6 +3627,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UMediumIntType=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UMediumIntType=>ObMySQLDateType */ + ObVarcharType, /*UMediumIntType=>ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -3449,6 +3685,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UInt32Type=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UInt32Type=>ObMySQLDateType */ + ObVarcharType, /*UInt32Type=>ObMySQLDateTimeType */ }, /*UIntType*/ @@ -3505,6 +3743,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UIntType=>ObUserDefinedSQLType*/ ObNumberType, /*IntType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UIntType=>ObMySQLDateType */ + ObVarcharType, /*UIntType=>ObMySQLDateTimeType */ }, /*FloatType*/ @@ -3561,6 +3801,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*FloatType=>ObUserDefinedSQLType*/ ObFloatType, /*FloatType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*FloatType=>ObMySQLDateType */ + ObVarcharType, /*FloatType=>ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -3617,6 +3859,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*DoubleTYpe=>ObUserDefinedSQLType*/ ObDoubleType, /*DoubleType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*DoubleType=>ObMySQLDateType */ + ObVarcharType, /*DoubleType=>ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -3673,6 +3917,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UFloatTYpe=>ObUserDefinedSQLType*/ ObFloatType, /*FloatType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UFloatType=>ObMySQLDateType */ + ObVarcharType, /*UFloatType=>ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -3729,6 +3975,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UDoubleTYpe=>ObUserDefinedSQLType*/ ObDoubleType, /*UDoubleType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UDoubleType=>ObMySQLDateType */ + ObVarcharType, /*UDoubleType=>ObMySQLDateTimeType */ }, /*NumberType*/ @@ -3785,6 +4033,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*NumberTYpe=>ObUserDefinedSQLType*/ ObNumberType, /*NumberType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*NumberType=>ObMySQLDateType */ + ObVarcharType, /*NumberType=>ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -3841,6 +4091,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UNumberTYpe=>ObUserDefinedSQLType*/ ObNumberType, /*NumberType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UNumberType=>ObMySQLDateType */ + ObVarcharType, /*UNumberType=>ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -3897,6 +4149,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*DateTimeTYpe=>ObUserDefinedSQLType*/ ObVarcharType, /*DateTimeType=>ObDecimalIntType */ ObMaxType, + ObMySQLDateTimeType, /*DateTimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*DateTimeType=>ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -3953,6 +4207,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*TimestampTYpe=>ObUserDefinedSQLType*/ ObVarcharType, /*TimestampType=>ObDecimalIntType */ ObMaxType, + ObMySQLDateTimeType, /*TimestampType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*TimestampType=>ObMySQLDateTimeType */ }, /*DateType*/ @@ -4009,6 +4265,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*DateTYpe=>ObUserDefinedSQLType*/ ObVarcharType, /*TimestampType=>ObDecimalIntType */ ObMaxType, + ObMySQLDateType, /*DateType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*DateType=>ObMySQLDateTimeType */ }, /*TimeType*/ @@ -4065,6 +4323,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*TimeTYpe=>ObUserDefinedSQLType*/ ObVarcharType, /*TimestampType=>ObDecimalIntType */ ObMaxType, + ObMySQLDateTimeType, /*TimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*TimeType=>ObMySQLDateTimeType */ }, /*YearType*/ @@ -4121,6 +4381,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*YearTYpe=>ObUserDefinedSQLType*/ ObDecimalIntType, /*YearType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*YearType=>ObMySQLDateType */ + ObVarcharType, /*YearType=>ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -4177,6 +4439,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*VarcharTYpe=>ObUserDefinedSQLType*/ ObVarcharType, /*VarcharType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*VarcharType=>ObMySQLDateType */ + ObVarcharType, /*VarcharType=>ObMySQLDateTimeType */ }, /*CharType*/ @@ -4233,6 +4497,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*CharType=>ObUserDefinedSQLType*/ ObCharType, /*CharType=>ObDecimalIntType */ ObMaxType, + ObCharType, /*CharType=>ObMySQLDateType */ + ObCharType, /*CharType=>ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -4289,6 +4555,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*HexStringType=>ObUserDefinedSQLType*/ ObVarcharType, /*HexStringType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*HexStringType=>ObMySQLDateType */ + ObVarcharType, /*HexStringType=>ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -4345,6 +4613,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType, /*ExtendType=>ObUserDefinedSQLType*/ ObMaxType, /*ExtendType=>ObDecimalIntType */ ObCollectionSQLType, /*ExtendType=>ObCollectionSQLType*/ + ObMaxType, /*ExtendType=>ObMySQLDateType */ + ObMaxType, /*ExtendType=>ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -4401,6 +4671,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*UnknownType=>ObUserDefinedSQLType*/ ObVarcharType, /*UnknownType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*UnknownType=>ObMySQLDateType */ + ObVarcharType, /*UnknownType=>ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -4456,6 +4728,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTinyTextType=>ObUserDefinedSQLType*/ ObTinyTextType, /*ObTinyTextType=>ObDecimalIntType */ ObMaxType, + ObTinyTextType, /*ObTinyTextType=>ObMySQLDateType */ + ObTinyTextType, /*ObTinyTextType=>ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -4511,6 +4785,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTextType=>ObUserDefinedSQLType*/ ObTextType, /*ObTextType=>ObDecimalIntType */ ObMaxType, + ObTextType, /*ObTextType=>ObMySQLDateType */ + ObTextType, /*ObTextType=>ObMySQLDateTimeType */ }, /*ObMediumTextType*/ @@ -4566,6 +4842,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObGeometryType, /*ObMediumTextType=>ObGeometryType*/ ObMaxType, /*ObMediumTextType=>ObUserDefinedSQLType*/ ObMediumTextType, /*ObMediumTextType=>ObDecimalIntType */ + ObMediumTextType, /*ObMediumTextType=>ObMySQLDateType */ + ObMediumTextType, /*ObMediumTextType=>ObMySQLDateTimeType */ ObMaxType, }, @@ -4623,6 +4901,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObLongTextType=>ObUserDefinedSQLType*/ ObLongTextType, /*ObLongTextType=>ObDecimalIntType */ ObMaxType, + ObLongTextType, /*ObLongTextType=>ObMySQLDateType */ + ObLongTextType, /*ObLongTextType=>ObMySQLDateTimeType */ }, /*ObBitType*/ { @@ -4678,6 +4958,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObBitType=>ObUserDefinedSQLType*/ ObNumberType, /*ObBitType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*ObBitType=>ObMySQLDateType */ + ObVarcharType, /*ObBitType=>ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -4733,6 +5015,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObEnumType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObEnumType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*ObEnumType=>ObMySQLDateType */ + ObVarcharType, /*ObEnumType=>ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -4788,6 +5072,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObSetType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObSetType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*ObSetType=>ObMySQLDateType */ + ObVarcharType, /*ObSetType=>ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -4843,6 +5129,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObEnumInnerType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObEnumInnerType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*ObEnumInnerType=>ObMySQLDateType */ + ObVarcharType, /*ObEnumInnerType=>ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -4898,6 +5186,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObSetInnerType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObSetInnerType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*ObSetInnerType=>ObMySQLDateType */ + ObVarcharType, /*ObSetInnerType=>ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -4953,6 +5243,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampTZType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObTimestampTZType=>ObDecimalIntType */ ObMaxType, + ObTimestampTZType, /*ObTimestampTZType=>ObMySQLDateType */ + ObTimestampTZType, /*ObTimestampTZType=>ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -5008,6 +5300,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampLTZType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObTimestampLTZType=>ObDecimalIntType */ ObMaxType, + ObTimestampLTZType, /*ObTimestampLTZType=>ObMySQLDateType */ + ObTimestampLTZType, /*ObTimestampLTZType=>ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -5063,6 +5357,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObTimestampNanoType=>ObUserDefinedSQLType*/ ObVarcharType, /*ObTimestampNanoType=>ObDecimalIntType */ ObMaxType, + ObTimestampNanoType, /*ObTimestampNanoType=>ObMySQLDateType */ + ObTimestampNanoType, /*ObTimestampNanoType=>ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -5118,6 +5414,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObRawType=>ObUserDefinedSQLType*/ ObRawType, /* ObRawType=>ObDecimalIntType */ ObMaxType, + ObRawType, /*ObRawType=>ObMySQLDateType */ + ObRawType, /*ObRawType=>ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -5173,6 +5471,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObIntervalYMType=>ObUserDefinedSQLType*/ ObIntervalYMType, /* ObIntervalYMType=>ObDecimalIntType */ ObMaxType, + ObIntervalYMType, /*ObIntervalYMType=>ObMySQLDateType */ + ObIntervalYMType, /*ObIntervalYMType=>ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -5228,6 +5528,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObIntervalDSType=>ObUserDefinedSQLType*/ ObIntervalDSType, /* ObIntervalDSType=>ObDecimalIntType */ ObMaxType, + ObIntervalDSType, /*ObIntervalDSType=>ObMySQLDateType */ + ObMaxType, /*ObIntervalDSType=>ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ @@ -5284,6 +5586,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*NumberFloatType=>ObUserDefinedSQLType*/ ObNumberType, /*NumberFloatType=>ObDecimalIntType */ ObMaxType, + ObVarcharType, /*NumberFloatType=>ObMySQLDateType */ + ObVarcharType, /*NumberFloatType=>ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -5339,6 +5643,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObNVarchar2Type=>ObUserDefinedSQLType*/ ObNVarchar2Type, /* ObNVarchar2Type=>ObDecimalIntType */ ObMaxType, + ObNVarchar2Type, /*ObNVarchar2Type=>ObMySQLDateType */ + ObNVarchar2Type, /*ObNVarchar2Type=>ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -5394,6 +5700,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObNCharType=>ObUserDefinedSQLType*/ ObNCharType, /* ObNCharType=>ObDecimalIntType */ ObMaxType, + ObNCharType, /*ObNCharType=>ObMySQLDateType */ + ObNCharType, /*ObNCharType=>ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -5449,6 +5757,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObURowIDType=>ObUserDefinedSQLType*/ ObMaxType, /* ObURowIDType=>ObDecimalIntType */ ObMaxType, + ObMaxType, /*ObURowIDType=>ObMySQLDateType */ + ObMaxType, /*ObURowIDType=>ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -5504,6 +5814,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /* ObLobType=>ObUserDefinedSQLType*/ ObMaxType, /* ObLobType=>ObDecimalIntType */ ObMaxType, + ObMaxType, /*ObLobType=>ObMySQLDateType */ + ObMaxType, /*ObLobType=>ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -5559,6 +5871,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /*ObJsonType=>ObUserDefinedSQLType*/ ObJsonType, /* ObJsonType=>ObDecimalIntType */ ObMaxType, + ObJsonType, /*ObJsonType=>ObMySQLDateType */ + ObJsonType, /*ObJsonType=>ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -5614,6 +5928,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /* ObGeometryType=>ObUserDefinedSQLType*/ ObGeometryType, /* ObGeometryType=>ObDecimalIntType */ ObMaxType, + ObGeometryType, /*ObGeometryType=>ObMySQLDateType */ + ObGeometryType, /*ObGeometryType=>ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -5669,6 +5985,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObUserDefinedSQLType, /*ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateType */ + ObMaxType, /*ObUserDefinedSQLType=>ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -5724,6 +6042,8 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /* ObDecimalIntType=>ObUserDefinedSqlType */ ObNumberType, /*ObDecimalIntType=>ObDecimalIntType */ ObMaxType, /* ObDecimalIntType=>ObCollectionSQLType */ + ObVarcharType, /*ObDecimalIntType=>ObMySQLDateType */ + ObVarcharType, /*ObDecimalIntType=>ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -5777,8 +6097,124 @@ static constexpr ObObjType MERGE_RESULT_TYPE_ORACLE[ObMaxType][ObMaxType] = { ObMaxType, /* ObCollectionSQLType=>ObJsonType*/ ObMaxType, /* ObCollectionSQLType=>ObGeometryType*/ ObMaxType, /* ObCollectionSQLType=>ObUserDefinedSQLType*/ - ObMaxType, /* ObCollectionSQLType=>ObDecimalIntType */ - ObCollectionSQLType, /* ObCollectionSQLType */ + ObMaxType, /* ObCollectionSQLType=>ObDecimalIntType*/ + ObCollectionSQLType, /* ObCollectionSQLType=>ObCollectionSQLType*/ + ObMaxType, /* ObCollectionSQLType=>ObMySQLDateType */ + ObMaxType, /* ObCollectionSQLType=>ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObMySQLDateType, /*ObMySQLDateType=>NullType */ + ObVarcharType, /*ObMySQLDateType=>TinyIntType */ + ObVarcharType, /*ObMySQLDateType=>SmallIntType */ + ObVarcharType, /*ObMySQLDateType=>MediumIntType */ + ObVarcharType, /*ObMySQLDateType=>Int32Type */ + ObVarcharType, /*ObMySQLDateType=>IntType */ + ObVarcharType, /*ObMySQLDateType=>UTinyIntType */ + ObVarcharType, /*ObMySQLDateType=>USmallIntType */ + ObVarcharType, /*ObMySQLDateType=>UMediumIntType */ + ObVarcharType, /*ObMySQLDateType=>UInt32Type */ + ObVarcharType, /*ObMySQLDateType=>UIntType */ + ObVarcharType, /*ObMySQLDateType=>FloatType */ + ObVarcharType, /*ObMySQLDateType=>DoubleType */ + ObVarcharType, /*ObMySQLDateType=>UFloatType */ + ObVarcharType, /*ObMySQLDateType=>UDoubleType */ + ObVarcharType, /*ObMySQLDateType=>NumberType */ + ObVarcharType, /*ObMySQLDateType=>UNumberType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>DateTimeType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>TimestampType */ + ObMySQLDateType, /*ObMySQLDateType=>DateType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>TimeType */ + ObVarcharType, /*ObMySQLDateType=>YearType */ + ObVarcharType, /*ObMySQLDateType=>VarcharType */ + ObCharType, /*ObMySQLDateType=>CharType */ + ObVarcharType, /*ObMySQLDateType=>HexStringType */ + ObMaxType, /*ObMySQLDateType=>ExtendType */ + ObVarcharType, /*ObMySQLDateType=>UnknownType */ + ObTinyTextType, /*ObMySQLDateType=>ObTinyTextType */ + ObTextType, /* ObMySQLDateType=>ObTextType */ + ObMediumTextType, /* ObMySQLDateType=>ObMediumTextType */ + ObLongTextType, /* ObMySQLDateType=>ObLongTextType */ + ObVarcharType, /* ObMySQLDateType=>ObBitType */ + ObVarcharType, /* ObMySQLDateType=>ObEnumType */ + ObVarcharType, /* ObMySQLDateType=>ObSetType */ + ObMaxType, /* ObMySQLDateType=>ObEnumInnerType */ + ObMaxType, /* ObMySQLDateType=>ObSetInnerType */ + ObTimestampTZType, /*ObMySQLDateType=>ObTimestampTZType */ + ObTimestampLTZType, /*ObMySQLDateType=>ObTimestampLTZType */ + ObTimestampNanoType, /*ObMySQLDateType=>ObTimestampNanoType */ + ObRawType, /*ObMySQLDateType=>ObRawType */ + ObMaxType, /*ObMySQLDateType=>ObIntervalYMType */ + ObMaxType, /*ObMySQLDateType=>ObIntervalDSType */ + ObMaxType, /*ObMySQLDateType=>ObNumberFloatType */ + ObNVarchar2Type, /*ObMySQLDateType=>ObNVarchar2Type */ + ObNCharType, /*ObMySQLDateType=>ObNCharType */ + ObMaxType, /*ObMySQLDateType=>URowIDType*/ + ObMaxType, /*ObMySQLDateType=>ObLobType*/ + ObJsonType, /*ObMySQLDateType=>ObJsonType*/ + ObGeometryType, /*ObMySQLDateType=>ObGeometryType*/ + ObMaxType, /*ObMySQLDateType=>ObUserDefinedSQLType*/ + ObVarcharType, /*ObMySQLDateType=>ObDecimalIntType*/ + ObMaxType, /*ObMySQLDateType=>ObCollectionSQLType*/ + ObMySQLDateType, /*ObMySQLDateType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*ObMySQLDateType=>ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>NullType */ + ObVarcharType, /*ObMySQLDateTimeType=>TinyIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>SmallIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>MediumIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>Int32Type */ + ObVarcharType, /*ObMySQLDateTimeType=>IntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UTinyIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>USmallIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UMediumIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>UInt32Type */ + ObVarcharType, /*ObMySQLDateTimeType=>UIntType */ + ObVarcharType, /*ObMySQLDateTimeType=>FloatType */ + ObVarcharType, /*ObMySQLDateTimeType=>DoubleType */ + ObVarcharType, /*ObMySQLDateTimeType=>UFloatType */ + ObVarcharType, /*ObMySQLDateTimeType=>UDoubleType */ + ObVarcharType, /*ObMySQLDateTimeType=>NumberType */ + ObVarcharType, /*ObMySQLDateTimeType=>UNumberType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>DateTimeType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>TimestampType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>DateType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>TimeType */ + ObVarcharType, /*ObMySQLDateTimeType=>YearType */ + ObVarcharType, /*ObMySQLDateTimeType=>VarcharType */ + ObCharType, /*ObMySQLDateTimeType=>CharType */ + ObVarcharType, /*ObMySQLDateTimeType=>HexStringType */ + ObMaxType, /*ObMySQLDateTimeType=>ExtendType */ + ObVarcharType, /*ObMySQLDateTimeType=>UnknownType */ + ObTinyTextType, /*ObMySQLDateTimeType=>ObTinyTextType */ + ObTextType, /* ObMySQLDateTimeType=>ObTextType */ + ObMediumTextType, /* ObMySQLDateTimeType=>ObMediumTextType */ + ObLongTextType, /* ObMySQLDateTimeType=>ObLongTextType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObBitType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObEnumType */ + ObVarcharType, /* ObMySQLDateTimeType=>ObSetType */ + ObMaxType, /* ObMySQLDateTimeType=>ObEnumInnerType */ + ObMaxType, /* ObMySQLDateTimeType=>ObSetInnerType */ + ObTimestampTZType, /*ObMySQLDateTimeType=>ObTimestampTZType */ + ObTimestampLTZType, /*ObMySQLDateTimeType=>ObTimestampLTZType */ + ObTimestampNanoType, /*ObMySQLDateTimeType=>ObTimestampNanoType */ + ObRawType, /*ObMySQLDateTimeType=>ObRawType */ + ObMaxType, /*ObMySQLDateTimeType=>ObIntervalYMType */ + ObMaxType, /*ObMySQLDateTimeType=>ObIntervalDSType */ + ObMaxType, /*ObMySQLDateTimeType=>ObNumberFloatType */ + ObNVarchar2Type, /*ObMySQLDateTimeType=>ObNVarchar2Type */ + ObNCharType, /*ObMySQLDateTimeType=>ObNCharType */ + ObMaxType, /*ObMySQLDateTimeType=>URowIDType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObLobType*/ + ObJsonType, /*ObMySQLDateTimeType=>ObJsonType*/ + ObGeometryType, /*ObMySQLDateTimeType=>ObGeometryType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObUserDefinedSQLType*/ + ObVarcharType, /*ObMySQLDateTimeType=>ObDecimalIntType*/ + ObMaxType, /*ObMySQLDateTimeType=>ObCollectionSQLType*/ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>ObMySQLDateType */ + ObMySQLDateTimeType, /*ObMySQLDateTimeType=>ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_mod_result_type.map b/src/sql/engine/expr/ob_expr_mod_result_type.map index 949830b73..b9657e9ca 100644 --- a/src/sql/engine/expr/ob_expr_mod_result_type.map +++ b/src/sql/engine/expr/ob_expr_mod_result_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -110,6 +112,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -166,6 +170,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -222,6 +228,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -278,6 +286,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -334,6 +344,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -390,6 +402,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -446,6 +460,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -502,6 +518,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -558,6 +576,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*UIntType*/ @@ -614,6 +634,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -670,6 +692,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -726,6 +750,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -782,6 +808,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObUDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUDoubleType, /* ObMySQLDateType */ + ObUDoubleType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -838,6 +866,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObUDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUDoubleType, /* ObMySQLDateType */ + ObUDoubleType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -894,6 +924,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -950,6 +982,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObUNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUNumberType, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1006,6 +1040,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1062,6 +1098,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1118,6 +1156,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1174,6 +1214,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1230,6 +1272,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObUNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1286,6 +1330,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1342,6 +1388,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1398,6 +1446,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUDoubleType, /* ObMySQLDateType */ + ObUDoubleType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1454,6 +1504,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /*ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1510,6 +1562,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*TinyTextType*/ { @@ -1565,6 +1619,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*TextType*/ { @@ -1620,6 +1676,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*MediumTextType*/ { @@ -1675,6 +1733,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*LongTextType*/ { @@ -1730,6 +1790,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1785,6 +1847,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObUNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObUInt64Type, /* ObMySQLDateType */ + ObUNumberType, /* ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1840,6 +1904,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1895,6 +1961,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1950,6 +2018,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2005,6 +2075,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ @@ -2061,6 +2133,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2116,6 +2190,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2171,6 +2247,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2226,6 +2304,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2281,6 +2361,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2336,6 +2418,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNumberFloatType*/ { @@ -2391,6 +2475,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2446,6 +2532,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNCharType*/ { @@ -2501,6 +2589,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2556,6 +2646,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2611,6 +2703,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2666,6 +2760,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2721,6 +2817,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /*ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2776,6 +2874,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /*ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ @@ -2832,6 +2932,8 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /*ObUserDefinedSQLType*/ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /*ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2887,6 +2989,122 @@ static constexpr ObObjType MOD_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObDoubleType, /* NullType */ + ObIntType, /* TinyIntType */ + ObIntType, /* SmallIntType */ + ObIntType, /* MediumIntType */ + ObIntType, /* Int32Type */ + ObIntType, /* IntType */ + ObIntType, /* UTinyIntType */ + ObIntType, /* USmallIntType */ + ObIntType, /* UMediumIntType */ + ObIntType, /* UInt32Type */ + ObIntType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObIntType, /* DateType */ + ObNumberType, /* TimeType */ + ObIntType, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObDoubleType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /*TinyTextType*/ + ObDoubleType, /*TextType*/ + ObDoubleType, /*MediumTextType*/ + ObDoubleType, /*LongTextType*/ + ObIntType, /* BitType */ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /*ObTimestampTZType */ + ObNumberType, /*ObTimestampLTZType */ + ObNumberType, /*ObTimestampNanoType */ + ObNumberType, /*ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObIntType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObDoubleType, /* NullType */ + ObNumberType, /* TinyIntType */ + ObNumberType, /* SmallIntType */ + ObNumberType, /* MediumIntType */ + ObNumberType, /* Int32Type */ + ObNumberType, /* IntType */ + ObNumberType, /* UTinyIntType */ + ObNumberType, /* USmallIntType */ + ObNumberType, /* UMediumIntType */ + ObNumberType, /* UInt32Type */ + ObNumberType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObNumberType, /* DateTimeType */ + ObNumberType, /* TimestampType */ + ObNumberType, /* DateType */ + ObNumberType, /* TimeType */ + ObNumberType, /* YearType */ + ObDoubleType, /* VarcharType */ + ObDoubleType, /* CharType */ + ObDoubleType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObDoubleType, /* UnknownType */ + ObDoubleType, /*TinyTextType*/ + ObDoubleType, /*TextType*/ + ObDoubleType, /*MediumTextType*/ + ObDoubleType, /*LongTextType*/ + ObNumberType, /* BitType */ + ObDoubleType, /* ObEnumType */ + ObDoubleType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObNumberType, /*ObTimestampTZType */ + ObNumberType, /*ObTimestampLTZType */ + ObNumberType, /*ObTimestampNanoType */ + ObNumberType, /*ObRawType */ + ObMaxType, /*ObIntervalYMType */ + ObMaxType, /*ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObMaxType, /* ObNVarchar2Type */ + ObMaxType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObDoubleType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_neg_result_type.map b/src/sql/engine/expr/ob_expr_neg_result_type.map index b45b6d410..1343f3ee1 100644 --- a/src/sql/engine/expr/ob_expr_neg_result_type.map +++ b/src/sql/engine/expr/ob_expr_neg_result_type.map @@ -52,6 +52,8 @@ static constexpr ObObjType NEG_RESULT_TYPE[ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }; static constexpr ObObjType NEG_RESULT_TYPE_ORACLE[ObMaxType] = @@ -108,6 +110,8 @@ static constexpr ObObjType NEG_RESULT_TYPE_ORACLE[ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }; static_assert(is_array_fully_initialized(NEG_RESULT_TYPE_ORACLE), "NEG_RESULT_TYPE_ORACLE is partially initlized"); diff --git a/src/sql/engine/expr/ob_expr_nvl_promotion.map b/src/sql/engine/expr/ob_expr_nvl_promotion.map index 028326ea5..bf7d69f9c 100644 --- a/src/sql/engine/expr/ob_expr_nvl_promotion.map +++ b/src/sql/engine/expr/ob_expr_nvl_promotion.map @@ -29,6 +29,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMySQLDateType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ }, { /*int -> XXX*/ @@ -59,6 +61,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*uint -> XXX*/ @@ -89,6 +93,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*float -> XXX*/ @@ -119,6 +125,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDoubleType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*double -> XXX*/ @@ -149,6 +157,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDoubleType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*number -> XXX*/ @@ -179,6 +189,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -209,6 +221,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMySQLDateTimeType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ }, { /*date -> XXX*/ @@ -239,6 +253,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMySQLDateType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ }, { /*time -> XXX*/ @@ -269,6 +285,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMySQLDateTimeType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ }, { /*year -> XXX*/ @@ -299,6 +317,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*string -> XXX*/ @@ -329,6 +349,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*extend -> XXX*/ @@ -359,6 +381,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -389,6 +413,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*text -> XXX*/ @@ -419,6 +445,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObLongTextType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObLongTextType, /*mysql date*/ + ObLongTextType, /*mysql datetime*/ }, { /*bit -> XXX*/ @@ -449,6 +477,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*EnumSet -> XXX*/ @@ -479,6 +509,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*EnumSetInner -> XXX*/ @@ -509,6 +541,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*OTimestamp -> XXX*/ @@ -539,6 +573,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObVarcharType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObTimestampTZType, /*mysql date*/ + ObTimestampTZType, /*mysql datetime*/ }, { /*Raw -> XXX*/ @@ -569,6 +605,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*Interval -> XXX*/ @@ -599,6 +637,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*RowID -> XXX*/ @@ -629,6 +669,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*Lob -> XXX*/ @@ -659,6 +701,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*Json -> XXX*/ @@ -688,6 +732,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*Geometry*/ ObMaxType, /*UDT*/ ObJsonType, /*DecimalInt*/ + ObJsonType, /*mysql date*/ + ObJsonType, /*mysql datetime*/ }, { /*Geometry -> XXX*/ @@ -718,6 +764,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*UDT*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*UDT -> XXX*/ @@ -748,6 +796,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*UDT*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ }, { /*DecimalInt -> XXX*/ @@ -778,6 +828,8 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*UDT*/ ObDecimalIntType,/*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObVarcharType, /*mysql date*/ + ObVarcharType, /*mysql datetime*/ }, { /*Collection Sql Type -> XXX*/ @@ -808,6 +860,72 @@ static const ObObjType NVL_TYPE_PROMOTION[ObMaxTC][ObMaxTC] = ObMaxType, /*UDT*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType, /*mysql date*/ + ObMaxType, /*mysql datetime*/ + }, + { + /*mysql date -> XXX*/ + ObMySQLDateType,/*null*/ + ObVarcharType,/*int*/ + ObVarcharType,/*uint*/ + ObVarcharType,/*float*/ + ObVarcharType,/*double*/ + ObVarcharType,/*number*/ + ObMySQLDateTimeType,/*datetime*/ + ObMySQLDateType,/*date*/ + ObMySQLDateTimeType,/*time*/ + ObVarcharType,/*year*/ + ObVarcharType,/*string*/ + ObMaxType,/*extend*/ + ObMaxType, /*unknown*/ + ObLongTextType, /*text*/ + ObVarcharType, /*bit*/ + ObVarcharType, /*EnumSet*/ + ObMaxType, /*EnumSetInner*/ + ObTimestampTZType, /*OTimestamp*/ + ObRawType, /*Raw*/ + ObMaxType, /*Interval*/ + ObMaxType, /*RowID*/ + ObMaxType, /*Lob*/ + ObJsonType, /*Json*/ + ObMaxType, /*Geometry*/ + ObMaxType, /*User Defined Type*/ + ObVarcharType,/*DecimalInt*/ + ObMaxType, /*Collection Sql Type*/ + ObMySQLDateType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ + }, + { + /*mysql datetime -> XXX*/ + ObMySQLDateTimeType,/*null*/ + ObVarcharType,/*int*/ + ObVarcharType,/*uint*/ + ObVarcharType,/*float*/ + ObVarcharType,/*double*/ + ObVarcharType,/*number*/ + ObMySQLDateTimeType,/*datetime*/ + ObMySQLDateTimeType,/*date*/ + ObMySQLDateTimeType,/*time*/ + ObVarcharType,/*year*/ + ObVarcharType,/*string*/ + ObMaxType,/*extend*/ + ObMaxType, /*unknown*/ + ObLongTextType, /*text*/ + ObVarcharType, /*bit*/ + ObVarcharType, /*EnumSet*/ + ObMaxType, /*EnumSetInner*/ + ObTimestampTZType, /*OTimestamp*/ + ObRawType, /*Raw*/ + ObMaxType, /*Interval*/ + ObMaxType, /*RowID*/ + ObMaxType, /*Lob*/ + ObJsonType, /*Json*/ + ObMaxType, /*Geometry*/ + ObMaxType, /*User Defined Type*/ + ObVarcharType,/*DecimalInt*/ + ObMaxType, /*Collection Sql Type*/ + ObMySQLDateTimeType, /*mysql date*/ + ObMySQLDateTimeType, /*mysql datetime*/ }, }; @@ -843,6 +961,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObUserDefinedSQLType, /*User Defined Type*/ ObNumberType, /*DecimalInt*/ ObCollectionSQLType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { // treat int as number, because const 1 will be parsed to bigint 1, not number 1 now. @@ -874,6 +994,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObNumberType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*uint -> XXX*/ @@ -904,6 +1026,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*float -> XXX*/ @@ -934,6 +1058,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObFloatType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*double -> XXX*/ @@ -964,6 +1090,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObDoubleType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*number -> XXX*/ @@ -994,6 +1122,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObNumberType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*datetime -> XXX*/ @@ -1024,6 +1154,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*date -> XXX*/ @@ -1054,6 +1186,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*time -> XXX*/ @@ -1084,6 +1218,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*year -> XXX*/ @@ -1114,6 +1250,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*string -> XXX*/ @@ -1144,6 +1282,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObVarcharType, /*User Defined Type*/ ObVarcharType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*extend -> XXX*/ @@ -1174,6 +1314,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObUserDefinedSQLType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*unknown -> XXX*/ @@ -1204,6 +1346,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*text -> XXX*/ @@ -1234,6 +1378,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObLongTextType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*bit -> XXX*/ @@ -1264,6 +1410,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*EnumSet -> XXX*/ @@ -1294,6 +1442,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*EnumSetInner -> XXX*/ @@ -1324,6 +1474,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*otimestamp-> XXX*/ @@ -1354,6 +1506,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*Raw-> XXX*/ @@ -1384,6 +1538,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*Interval-> XXX*/ @@ -1414,6 +1570,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*RowID-> XXX*/ @@ -1444,6 +1602,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*Lob -> XXX*/ @@ -1474,6 +1634,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*Json -> XXX*/ @@ -1504,6 +1666,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*Geometry -> XXX*/ @@ -1534,6 +1698,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*User Defined Type -> XXX*/ @@ -1564,6 +1730,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObUserDefinedSQLType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*DecimalInt -> XXX*/ @@ -1594,6 +1762,8 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*UDT*/ ObNumberType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, { /*User Defined Type -> XXX*/ @@ -1624,5 +1794,71 @@ static const ObObjType NVL_TYPE_PROMOTION_ORACLE[ObMaxTC][ObMaxTC] = ObMaxType, /*User Defined Type*/ ObMaxType, /*DecimalInt*/ ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ + }, + { + /*MySQL Date -> XXX*/ + ObMaxType, /*null*/ + ObMaxType, /*int*/ + ObMaxType, /*uint*/ + ObMaxType, /*float*/ + ObMaxType, /*double*/ + ObMaxType, /*number*/ + ObMaxType, /*datetime*/ + ObMaxType, /*date*/ + ObMaxType, /*time*/ + ObMaxType, /*year*/ + ObMaxType, /*string*/ + ObMaxType, /*extend*/ + ObMaxType, /*unknown*/ + ObMaxType, /*text*/ + ObMaxType, /*bit*/ + ObMaxType, /*EnumSet*/ + ObMaxType, /*EnumSetInner*/ + ObMaxType, /*OTimestamp*/ + ObMaxType, /*Raw*/ + ObMaxType, /*Interval*/ + ObMaxType, /*RowID*/ + ObMaxType, /*Lob*/ + ObMaxType, /*Json*/ + ObMaxType, /*Geometry*/ + ObMaxType, /*User Defined Type*/ + ObMaxType, /*DecimalInt*/ + ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ + }, + { + /*MySQL DateTime -> XXX*/ + ObMaxType, /*null*/ + ObMaxType, /*int*/ + ObMaxType, /*uint*/ + ObMaxType, /*float*/ + ObMaxType, /*double*/ + ObMaxType, /*number*/ + ObMaxType, /*datetime*/ + ObMaxType, /*date*/ + ObMaxType, /*time*/ + ObMaxType, /*year*/ + ObMaxType, /*string*/ + ObMaxType, /*extend*/ + ObMaxType, /*unknown*/ + ObMaxType, /*text*/ + ObMaxType, /*bit*/ + ObMaxType, /*EnumSet*/ + ObMaxType, /*EnumSetInner*/ + ObMaxType, /*OTimestamp*/ + ObMaxType, /*Raw*/ + ObMaxType, /*Interval*/ + ObMaxType, /*RowID*/ + ObMaxType, /*Lob*/ + ObMaxType, /*Json*/ + ObMaxType, /*Geometry*/ + ObMaxType, /*User Defined Type*/ + ObMaxType, /*DecimalInt*/ + ObMaxType, /*Collection Sql Type*/ + ObMaxType,/*mysql date*/ + ObMaxType,/*mysql datetime*/ }, }; diff --git a/src/sql/engine/expr/ob_expr_operator.cpp b/src/sql/engine/expr/ob_expr_operator.cpp index 8858527ae..1f2017f2d 100644 --- a/src/sql/engine/expr/ob_expr_operator.cpp +++ b/src/sql/engine/expr/ob_expr_operator.cpp @@ -1579,6 +1579,8 @@ ObObjType ObExprOperator::enumset_calc_types_[ObMaxTC] = ObNullType, /*UDT*/ ObUInt64Type, /*ObDecimalIntTC*/ ObNullType, /*COLLECTION*/ + ObVarcharType, /*ObMySQLDateTC*/ + ObVarcharType, /*ObMySQLDateTimeTC*/ }; //////////////////////////////////////////////////////////////// diff --git a/src/sql/engine/expr/ob_expr_relational_cmp_type.map b/src/sql/engine/expr/ob_expr_relational_cmp_type.map index aa84d1d64..ace4f284c 100644 --- a/src/sql/engine/expr/ob_expr_relational_cmp_type.map +++ b/src/sql/engine/expr/ob_expr_relational_cmp_type.map @@ -72,6 +72,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*TinyIntType*/ @@ -128,6 +130,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*SmallIntType*/ @@ -184,6 +188,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*MediumIntType*/ @@ -240,6 +246,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*Int32Type*/ @@ -296,6 +304,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*IntType*/ @@ -352,6 +362,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, // for all uint cmp int, we must set cmp type to unsigned, @@ -410,6 +422,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*USmallIntType*/ @@ -466,6 +480,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UMediumIntType*/ @@ -522,6 +538,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UInt32Type*/ @@ -578,6 +596,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UInt64Type*/ @@ -634,6 +654,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*FloatType*/ @@ -690,6 +712,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*DoubleType*/ @@ -746,6 +770,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UFloatType*/ @@ -802,6 +828,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UDoubleType*/ @@ -858,6 +886,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*NumberType*/ @@ -914,6 +944,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*UNumberType*/ @@ -970,6 +1002,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*DateTimeType*/ @@ -1026,6 +1060,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDateTimeType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*TimestampType*/ @@ -1082,6 +1118,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObTimestampType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*DateType*/ @@ -1138,6 +1176,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDateType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*TimeType*/ @@ -1194,6 +1234,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimeType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*YearType*/ @@ -1250,6 +1292,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObVarcharType, /* MySQLDateType */ + ObVarcharType, /* MySQLDateTimeType */ }, /*VarcharType*/ @@ -1306,6 +1350,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*CharType*/ @@ -1362,6 +1408,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*HexStringType*/ @@ -1418,6 +1466,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*ExtendType*/ @@ -1474,6 +1524,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*UnknownType*/ @@ -1530,6 +1582,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObIntType, /* MySQLDateType */ + ObIntType, /* MySQLDateTimeType */ }, /*TinyTextType*/ { @@ -1585,6 +1639,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*TextType*/ { @@ -1640,6 +1696,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*MediumTextType*/ { @@ -1695,6 +1753,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*LongTextType*/ { @@ -1750,6 +1810,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*BitType*/ { @@ -1805,6 +1867,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObNumberType, /* MySQLDateType */ + ObNumberType, /* MySQLDateTimeType */ }, /*EnumType*/ @@ -1861,6 +1925,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*SetType*/ { @@ -1916,6 +1982,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*EnumInnerType*/ { @@ -1971,6 +2039,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*SetInnerType*/ { @@ -2026,6 +2096,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2081,6 +2153,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampTZType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObTimestampTZType, /* MySQLDateType */ + ObTimestampTZType, /* MySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2136,6 +2210,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampLTZType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObTimestampLTZType, /* MySQLDateType */ + ObTimestampLTZType, /* MySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2191,6 +2267,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampNanoType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObTimestampNanoType, /* MySQLDateType */ + ObTimestampNanoType, /* MySQLDateTimeType */ }, /*ObRawType*/ { @@ -2246,6 +2324,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObRawType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObRawType, /* MySQLDateType */ + ObRawType, /* MySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2301,6 +2381,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntervalYMType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObIntervalYMType, /* MySQLDateType */ + ObIntervalYMType, /* MySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2356,6 +2438,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntervalDSType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObIntervalDSType, /* MySQLDateType */ + ObIntervalDSType, /* MySQLDateTimeType */ }, /*NumberFloatType*/ @@ -2412,6 +2496,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -2467,6 +2553,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*CharType*/ @@ -2523,6 +2611,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2578,6 +2668,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*ObLobType*/ { @@ -2633,6 +2725,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2688,6 +2782,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObJsonType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObJsonType, /* MySQLDateType */ + ObJsonType, /* MySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2743,6 +2839,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*User Defined Sql Type*/ { @@ -2798,6 +2896,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2853,6 +2953,8 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2908,6 +3010,122 @@ static constexpr ObObjType RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* MySQLDateType */ + ObMaxType, /* MySQLDateTimeType */ + }, + /*ObMySQLDateType*/ + { + ObMySQLDateType, /* NullType */ + ObMySQLDateType, /* TinyIntType */ + ObMySQLDateType, /* SmallIntType */ + ObMySQLDateType, /* MediumIntType */ + ObMySQLDateType, /* Int32Type */ + ObMySQLDateType, /* IntType */ + ObMySQLDateType, /* UTinyIntType */ + ObMySQLDateType, /* USmallIntType */ + ObMySQLDateType, /* UMediumIntType */ + ObMySQLDateType, /* UInt32Type */ + ObMySQLDateType, /* UIntType */ + ObMySQLDateType, /* FloatType */ + ObMySQLDateType, /* DoubleType */ + ObMySQLDateType, /* UFloatType */ + ObMySQLDateType, /* UDoubleType */ + ObMySQLDateType, /* NumberType */ + ObMySQLDateType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObTimestampType, /* TimestampType */ + ObMySQLDateType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObVarcharType, /* YearType */ + ObMySQLDateTimeType, /* VarcharType */ + ObMySQLDateTimeType, /* CharType */ + ObMySQLDateTimeType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObIntType, /* UnknownType */ + ObMySQLDateTimeType, /*TinyTextType*/ + ObMySQLDateTimeType, /*TextType*/ + ObMySQLDateTimeType, /*MediumTextType*/ + ObMySQLDateTimeType, /*LongTextType*/ + ObNumberType, /*BitType*/ + ObMySQLDateTimeType, /* EnumType */ + ObMySQLDateTimeType, /* SetType */ + ObMySQLDateTimeType, /* EnumInnerType */ + ObMySQLDateTimeType, /* SetInnerType */ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObRawType, /* ObRawType */ + ObIntervalYMType, /* ObIntervalYMType */ + ObIntervalDSType, /* ObIntervalDSType */ + ObMySQLDateType, /* ObNumberFloatType */ + ObMySQLDateTimeType, /* ObNVarchar2Type */ + ObMySQLDateTimeType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObJsonType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* UDT */ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* COLLECTION */ + ObMySQLDateType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ + }, + /*ObMySQLDateTimeType*/ + { + ObMySQLDateTimeType, /* NullType */ + ObMySQLDateTimeType, /* TinyIntType */ + ObMySQLDateTimeType, /* SmallIntType */ + ObMySQLDateTimeType, /* MediumIntType */ + ObMySQLDateTimeType, /* Int32Type */ + ObMySQLDateTimeType, /* IntType */ + ObMySQLDateTimeType, /* UTinyIntType */ + ObMySQLDateTimeType, /* USmallIntType */ + ObMySQLDateTimeType, /* UMediumIntType */ + ObMySQLDateTimeType, /* UInt32Type */ + ObMySQLDateTimeType, /* UIntType */ + ObMySQLDateTimeType, /* FloatType */ + ObMySQLDateTimeType, /* DoubleType */ + ObMySQLDateTimeType, /* UFloatType */ + ObMySQLDateTimeType, /* UDoubleType */ + ObMySQLDateTimeType, /* NumberType */ + ObMySQLDateTimeType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObTimestampType, /* TimestampType */ + ObMySQLDateTimeType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObVarcharType, /* YearType */ + ObMySQLDateTimeType, /* VarcharType */ + ObMySQLDateTimeType, /* CharType */ + ObMySQLDateTimeType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObIntType, /* UnknownType */ + ObMySQLDateTimeType, /*TinyTextType*/ + ObMySQLDateTimeType, /*TextType*/ + ObMySQLDateTimeType, /*MediumTextType*/ + ObMySQLDateTimeType, /*LongTextType*/ + ObNumberType, /*BitType*/ + ObMySQLDateTimeType, /* EnumType */ + ObMySQLDateTimeType, /* SetType */ + ObMySQLDateTimeType, /* EnumInnerType */ + ObMySQLDateTimeType, /* SetInnerType */ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObRawType, /* ObRawType */ + ObIntervalYMType, /* ObIntervalYMType */ + ObIntervalDSType, /* ObIntervalDSType */ + ObMySQLDateTimeType, /* ObNumberFloatType */ + ObMySQLDateTimeType, /* ObNVarchar2Type */ + ObMySQLDateTimeType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObJsonType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* UDT */ + ObMaxType, /* ObDecimalIntType */ + ObMaxType, /* COLLECTION */ + ObMySQLDateTimeType, /* MySQLDateType */ + ObMySQLDateTimeType, /* MySQLDateTimeType */ }, }; @@ -2969,6 +3187,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalintType */ ObMaxType, /* UDT */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -3025,6 +3245,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -3081,6 +3303,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -3137,6 +3361,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -3193,6 +3419,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -3249,6 +3477,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, // for all uint cmp int, we must set cmp type to unsigned, @@ -3307,6 +3537,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -3363,6 +3595,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -3419,6 +3653,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -3475,6 +3711,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UInt64Type*/ @@ -3531,6 +3769,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -3587,6 +3827,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObFloatType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -3643,6 +3885,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -3699,6 +3943,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObFloatType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -3755,6 +4001,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -3811,6 +4059,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -3867,6 +4117,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -3923,6 +4175,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDateTimeType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -3979,6 +4233,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -4035,6 +4291,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDateTimeType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -4091,6 +4349,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimeType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -4147,6 +4407,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -4203,6 +4465,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -4259,6 +4523,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -4315,6 +4581,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -4371,6 +4639,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -4427,6 +4697,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TinyTextType*/ { @@ -4482,6 +4754,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TextType*/ { @@ -4537,6 +4811,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*MediumTextType*/ { @@ -4592,6 +4868,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*LongTextType*/ { @@ -4647,6 +4925,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -4702,6 +4982,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*EnumType*/ @@ -4758,6 +5040,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*SetType*/ { @@ -4813,6 +5097,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*EnumInnerType*/ { @@ -4868,6 +5154,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*SetInnerType*/ { @@ -4923,6 +5211,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -4978,6 +5268,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampTZType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -5033,6 +5325,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampLTZType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -5088,6 +5382,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObTimestampNanoType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -5143,6 +5439,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObRawType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -5198,6 +5496,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntervalYMType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -5253,6 +5553,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObIntervalDSType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*NumberFloatType*/ @@ -5309,6 +5611,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObNVarchar2Type*/ { @@ -5364,6 +5668,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*NCharType*/ @@ -5420,6 +5726,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObURowIDType */ @@ -5476,6 +5784,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObURowIDType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObLobType */ { @@ -5531,6 +5841,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObJsonType */ { @@ -5586,6 +5898,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObJsonType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObGeometryType */ { @@ -5641,6 +5955,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* UDT */ { @@ -5696,6 +6012,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* ObDecimalIntType */ { @@ -5751,6 +6069,8 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /* COLLECTION */ { @@ -5806,6 +6126,122 @@ static constexpr ObObjType ORACLE_RELATIONAL_CMP_TYPE[ObMaxType][ObMaxType] = ObNullType, /* UDT */ ObMaxType, /* ObDecimalintType */ ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /* ObMySQLDateType */ + { + ObMaxType, /* NullType */ + ObMaxType, /* TinyIntType */ + ObMaxType, /* SmallIntType */ + ObMaxType, /* MediumIntType */ + ObMaxType, /* Int32Type */ + ObMaxType, /* IntType */ + ObMaxType, /* UTinyIntType */ + ObMaxType, /* USmallIntType */ + ObMaxType, /* UMediumIntType */ + ObMaxType, /* UInt32Type */ + ObMaxType, /* UIntType */ + ObMaxType, /* FloatType */ + ObMaxType, /* DoubleType */ + ObMaxType, /* UFloatType */ + ObMaxType, /* UDoubleType */ + ObMaxType, /* NumberType */ + ObMaxType, /* UNumberType */ + ObMaxType, /* DateTimeType */ + ObMaxType, /* TimestampType */ + ObMaxType, /* DateType */ + ObMaxType, /* TimeType */ + ObMaxType, /* YearType */ + ObNullType, /* VarcharType */ + ObNullType, /* CharType */ + ObMaxType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObMaxType, /* UnknownType */ + ObMaxType, /*TinyTextType*/ + ObMaxType, /*TextType*/ + ObMaxType, /*MediumTextType*/ + ObMaxType, /*LongTextType*/ + ObMaxType, /*BitType*/ + ObMaxType, /* EnumType */ + ObMaxType, /* SetType */ + ObMaxType, /* EnumInnerType */ + ObMaxType, /* SetInnerType */ + ObMaxType, /* ObTimestampTZType */ + ObMaxType, /* ObTimestampLTZType */ + ObMaxType, /* ObTimestampNanoType */ + ObMaxType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObNullType, /* ObNVarchar2Type */ + ObNullType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObMaxType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObNullType, /* UDT */ + ObMaxType, /* ObDecimalintType */ + ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /* ObMySQLDateTimeType */ + { + ObMaxType, /* NullType */ + ObMaxType, /* TinyIntType */ + ObMaxType, /* SmallIntType */ + ObMaxType, /* MediumIntType */ + ObMaxType, /* Int32Type */ + ObMaxType, /* IntType */ + ObMaxType, /* UTinyIntType */ + ObMaxType, /* USmallIntType */ + ObMaxType, /* UMediumIntType */ + ObMaxType, /* UInt32Type */ + ObMaxType, /* UIntType */ + ObMaxType, /* FloatType */ + ObMaxType, /* DoubleType */ + ObMaxType, /* UFloatType */ + ObMaxType, /* UDoubleType */ + ObMaxType, /* NumberType */ + ObMaxType, /* UNumberType */ + ObMaxType, /* DateTimeType */ + ObMaxType, /* TimestampType */ + ObMaxType, /* DateType */ + ObMaxType, /* TimeType */ + ObMaxType, /* YearType */ + ObNullType, /* VarcharType */ + ObNullType, /* CharType */ + ObMaxType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObMaxType, /* UnknownType */ + ObMaxType, /*TinyTextType*/ + ObMaxType, /*TextType*/ + ObMaxType, /*MediumTextType*/ + ObMaxType, /*LongTextType*/ + ObMaxType, /*BitType*/ + ObMaxType, /* EnumType */ + ObMaxType, /* SetType */ + ObMaxType, /* EnumInnerType */ + ObMaxType, /* SetInnerType */ + ObMaxType, /* ObTimestampTZType */ + ObMaxType, /* ObTimestampLTZType */ + ObMaxType, /* ObTimestampNanoType */ + ObMaxType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObMaxType, /* ObNumberFloatType */ + ObNullType, /* ObNVarchar2Type */ + ObNullType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObMaxType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObNullType, /* UDT */ + ObMaxType, /* ObDecimalintType */ + ObMaxType, /* COLLECTION */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_relational_equal_type.map b/src/sql/engine/expr/ob_expr_relational_equal_type.map index ff0908b11..0271f41dd 100644 --- a/src/sql/engine/expr/ob_expr_relational_equal_type.map +++ b/src/sql/engine/expr/ob_expr_relational_equal_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ @@ -110,6 +112,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -166,6 +170,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -222,6 +228,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -278,6 +286,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -334,6 +344,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ { @@ -389,6 +401,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -445,6 +459,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -501,6 +517,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -557,6 +575,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UInt64Type*/ @@ -613,6 +633,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -669,6 +691,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -725,6 +749,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -781,6 +807,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -837,6 +865,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -893,6 +923,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -949,6 +981,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1005,6 +1039,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDateTimeType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1061,6 +1097,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObTimestampType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObTimestampType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1117,6 +1155,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDateType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1173,6 +1213,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObTimeType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1229,6 +1271,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1285,6 +1329,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1341,6 +1387,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1397,6 +1445,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1453,6 +1503,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1509,6 +1561,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*TinyTextType*/ { @@ -1564,6 +1618,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TextType*/ { @@ -1619,6 +1675,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*MediumTextType*/ { @@ -1674,6 +1732,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*LongTextType*/ { @@ -1729,6 +1789,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1784,6 +1846,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*EnumType*/ { @@ -1839,6 +1903,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*SetType*/ { @@ -1894,6 +1960,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*EnumInnerType*/ { @@ -1949,6 +2017,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*SetInnerType*/ { @@ -2004,6 +2074,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2059,6 +2131,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObTimestampTZType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObTimestampTZType, /* ObMySQLDateType */ + ObTimestampTZType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2114,6 +2188,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObTimestampLTZType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObTimestampLTZType, /* ObMySQLDateType */ + ObTimestampLTZType, /* ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2169,6 +2245,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObTimestampNanoType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObTimestampNanoType, /* ObMySQLDateType */ + ObTimestampNanoType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2224,6 +2302,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObRawType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObRawType, /* ObMySQLDateType */ + ObRawType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2279,6 +2359,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObIntervalYMType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntervalYMType, /* ObMySQLDateType */ + ObIntervalYMType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2334,6 +2416,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObIntervalDSType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObIntervalDSType, /* ObMySQLDateType */ + ObIntervalDSType, /* ObMySQLDateTimeType */ }, /*NumberFloatType*/ @@ -2390,6 +2474,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNumberType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*NVarchar2Type*/ @@ -2446,6 +2532,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*NCharType*/ @@ -2502,6 +2590,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2557,6 +2647,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2612,6 +2704,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2667,6 +2761,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObJsonType, /* ObMySQLDateType */ + ObJsonType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2722,6 +2818,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2777,6 +2875,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*DecimalIntType*/ { @@ -2832,6 +2932,8 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2887,7 +2989,124 @@ static constexpr ObObjType RELATIONAL_EQUAL_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ - } + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + + /*MySQLDateType*/ + { + ObMaxType, /* NullType */ + ObMySQLDateType, /* TinyIntType */ + ObMySQLDateType, /* SmallIntType */ + ObMySQLDateType, /* MediumIntType */ + ObMySQLDateType, /* Int32Type */ + ObMySQLDateType, /* IntType */ + ObMySQLDateType, /* UTinyIntType */ + ObMySQLDateType, /* USmallIntType */ + ObMySQLDateType, /* UMediumIntType */ + ObMySQLDateType, /* UInt32Type */ + ObMySQLDateType, /* UIntType */ + ObMySQLDateType, /* FloatType */ + ObMySQLDateType, /* DoubleType */ + ObMySQLDateType, /* UFloatType */ + ObMySQLDateType, /* UDoubleType */ + ObMySQLDateType, /* NumberType */ + ObMySQLDateType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObTimestampType, /* TimestampType */ + ObMySQLDateType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObVarcharType, /* YearType */ + ObMySQLDateTimeType, /* VarcharType */ + ObMySQLDateTimeType, /* CharType */ + ObMySQLDateTimeType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObMaxType, /* UnknownType */ + ObMySQLDateTimeType, /*TinyTextType*/ + ObMySQLDateTimeType, /*TextType*/ + ObMySQLDateTimeType, /*MediumTextType*/ + ObMySQLDateTimeType, /*LongTextType*/ + ObMySQLDateType, /* BitType */ + ObMaxType, /* EnumType */ + ObMaxType, /* SetType */ + ObMaxType, /*EnumInnerType*/ + ObMaxType, /*SetInnerType*/ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObRawType, /* ObRawType */ + ObIntervalYMType, /* ObIntervalYMType */ + ObIntervalDSType, /* ObIntervalDSType */ + ObMySQLDateType, /* ObNumberFloatType */ + ObMySQLDateTimeType, /* ObNVarchar2Type */ + ObMySQLDateTimeType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObJsonType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObMySQLDateType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObMaxType, /* NullType */ + ObMySQLDateTimeType, /* TinyIntType */ + ObMySQLDateTimeType, /* SmallIntType */ + ObMySQLDateTimeType, /* MediumIntType */ + ObMySQLDateTimeType, /* Int32Type */ + ObMySQLDateTimeType, /* IntType */ + ObMySQLDateTimeType, /* UTinyIntType */ + ObMySQLDateTimeType, /* USmallIntType */ + ObMySQLDateTimeType, /* UMediumIntType */ + ObMySQLDateTimeType, /* UInt32Type */ + ObMySQLDateTimeType, /* UIntType */ + ObMySQLDateTimeType, /* FloatType */ + ObMySQLDateTimeType, /* DoubleType */ + ObMySQLDateTimeType, /* UFloatType */ + ObMySQLDateTimeType, /* UDoubleType */ + ObMySQLDateTimeType, /* NumberType */ + ObMySQLDateTimeType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObMySQLDateTimeType, /* TimestampType */ + ObMySQLDateTimeType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObVarcharType, /* YearType */ + ObMySQLDateTimeType, /* VarcharType */ + ObMySQLDateTimeType, /* CharType */ + ObMySQLDateTimeType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObMaxType, /* UnknownType */ + ObMySQLDateTimeType, /*TinyTextType*/ + ObMySQLDateTimeType, /*TextType*/ + ObMySQLDateTimeType, /*MediumTextType*/ + ObMySQLDateTimeType, /*LongTextType*/ + ObMySQLDateTimeType, /*BitType*/ + ObMaxType, /*EnumType*/ + ObMaxType, /*SetType*/ + ObMaxType, /*EnumInnerType*/ + ObMaxType, /*SetInnerType*/ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObRawType, /* ObRawType */ + ObIntervalYMType, /* ObIntervalYMType */ + ObIntervalDSType, /* ObIntervalDSType */ + ObMySQLDateTimeType, /* ObNumberFloatType */ + ObMySQLDateTimeType, /* ObNVarchar2Type */ + ObMySQLDateTimeType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObJsonType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObMySQLDateTimeType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType */ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ + }, }; static_assert(is_array_fully_initialized(RELATIONAL_EQUAL_TYPE, ObMaxType), "RELATIONAL_EQUAL_TYPE is partially initlized"); diff --git a/src/sql/engine/expr/ob_expr_relational_result_type.map b/src/sql/engine/expr/ob_expr_relational_result_type.map index 932ddb7a2..7b712873b 100644 --- a/src/sql/engine/expr/ob_expr_relational_result_type.map +++ b/src/sql/engine/expr/ob_expr_relational_result_type.map @@ -54,6 +54,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TinyIntType*/ { @@ -109,6 +111,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*SmallIntType*/ @@ -165,6 +169,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*MediumIntType*/ @@ -221,6 +227,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*Int32Type*/ @@ -277,6 +285,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*IntType*/ @@ -333,6 +343,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UTinyIntType*/ @@ -389,6 +401,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*USmallIntType*/ @@ -445,6 +459,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UMediumIntType*/ @@ -501,6 +517,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UInt32Type*/ @@ -557,6 +575,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*UIntType*/ @@ -613,6 +633,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObIntType, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*FloatType*/ @@ -669,6 +691,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*DoubleType*/ @@ -725,6 +749,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UFloatType*/ @@ -781,6 +807,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*UDoubleType*/ @@ -837,6 +865,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }, /*NumberType*/ @@ -893,6 +923,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*UNumberType*/ @@ -949,6 +981,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }, /*DateTimeType*/ @@ -1005,6 +1039,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TimestampType*/ @@ -1061,6 +1097,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*DateType*/ @@ -1117,6 +1155,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*TimeType*/ @@ -1173,6 +1213,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, /*YearType*/ @@ -1229,6 +1271,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*VarcharType*/ @@ -1285,6 +1329,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*CharType*/ @@ -1341,6 +1387,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*HexStringType*/ @@ -1397,6 +1445,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*ExtendType*/ @@ -1453,6 +1503,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*UnknownType*/ @@ -1509,6 +1561,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObVarcharType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*ObTinyTextType*/ { @@ -1564,6 +1618,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObLongTextType, /* ObMySQLDateType */ + ObLongTextType, /* ObMySQLDateTimeType */ }, /*ObTextType*/ { @@ -1619,6 +1675,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObLongTextType, /* ObMySQLDateType */ + ObLongTextType, /* ObMySQLDateTimeType */ }, /*ObMediumTextType*/ { @@ -1674,6 +1732,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObLongTextType, /* ObMySQLDateType */ + ObLongTextType, /* ObMySQLDateTimeType */ }, /*ObLongTextType*/ { @@ -1729,6 +1789,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObLongTextType, /* ObMySQLDateType */ + ObLongTextType, /* ObMySQLDateTimeType */ }, /*BitType*/ { @@ -1784,6 +1846,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObInt32Type, /* ObMySQLDateType */ + ObIntType, /* ObMySQLDateTimeType */ }, /*ObEnumType*/ { @@ -1839,6 +1903,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*ObSetType*/ { @@ -1894,6 +1960,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*ObEnumInnerType*/ { @@ -1949,6 +2017,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObSetInnerType*/ { @@ -2004,6 +2074,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObTimestampTZType*/ { @@ -2059,6 +2131,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObVarcharType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObTimestampTZType, /* ObMySQLDateType */ + ObTimestampTZType, /* ObMySQLDateTimeType */ }, /*ObTimestampLTZType*/ { @@ -2114,6 +2188,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObVarcharType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObTimestampLTZType, /* ObMySQLDateType */ + ObTimestampLTZType, /* ObMySQLDateTimeType */ }, /*ObTimestampNanoType*/ { @@ -2169,6 +2245,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObVarcharType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObTimestampNanoType, /* ObMySQLDateType */ + ObTimestampNanoType, /* ObMySQLDateTimeType */ }, /*ObRawType*/ { @@ -2224,6 +2302,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalYMType*/ { @@ -2279,6 +2359,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObIntervalDSType*/ { @@ -2334,6 +2416,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*NumberFloatType*/ @@ -2390,6 +2474,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*NVarchar2Type*/ { @@ -2445,6 +2531,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNVarchar2Type, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNVarchar2Type, /* ObMySQLDateType */ + ObNVarchar2Type, /* ObMySQLDateTimeType */ }, /*NCharType*/ @@ -2501,6 +2589,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObNCharType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObNCharType, /* ObMySQLDateType */ + ObNCharType, /* ObMySQLDateTimeType */ }, /*ObURowIDType*/ { @@ -2556,6 +2646,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObLobType*/ { @@ -2611,6 +2703,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObJsonType*/ { @@ -2666,6 +2760,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDoubleType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObVarcharType, /* ObMySQLDateType */ + ObVarcharType, /* ObMySQLDateTimeType */ }, /*ObGeometryType*/ { @@ -2721,6 +2817,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObUserDefinedSQLType*/ { @@ -2776,6 +2874,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ }, /*ObDecimalIntType*/ { @@ -2831,6 +2931,8 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* UDT */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObDecimalIntType, /* ObMySQLDateType */ + ObDecimalIntType, /* ObMySQLDateTimeType */ }, /*ObCollectionSQLType*/ { @@ -2886,6 +2988,122 @@ static constexpr ObObjType RELATIONAL_RESULT_TYPE[ObMaxType][ObMaxType] = ObMaxType, /* ObUserDefinedSQLType*/ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType*/ + ObMaxType, /* ObMySQLDateType */ + ObMaxType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateType*/ + { + ObMySQLDateType, /* NullType */ + ObInt32Type, /* TinyIntType */ + ObInt32Type, /* SmallIntType */ + ObInt32Type, /* MediumIntType */ + ObInt32Type, /* Int32Type */ + ObIntType, /* IntType */ + ObInt32Type, /* UTinyIntType */ + ObInt32Type, /* USmallIntType */ + ObInt32Type, /* UMediumIntType */ + ObInt32Type, /* UInt32Type */ + ObIntType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObMySQLDateTimeType, /* TimestampType */ + ObMySQLDateType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObInt32Type, /* YearType */ + ObVarcharType, /* VarcharType */ + ObVarcharType, /* CharType */ + ObVarcharType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObVarcharType, /* UnknownType */ + ObLongTextType, /* ObTinyTextType */ + ObLongTextType, /* ObTextType */ + ObLongTextType, /* ObMediumTextType */ + ObLongTextType, /* ObLongTextType */ + ObInt32Type, /* ObBitType */ + ObVarcharType, /* ObEnumType */ + ObVarcharType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObMaxType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObVarcharType, /* ObNumberFloatType */ + ObNVarchar2Type, /* ObNVarchar2Type */ + ObNCharType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObVarcharType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObDecimalIntType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ + }, + /*MySQLDateTimeType*/ + { + ObMySQLDateTimeType, /* NullType */ + ObIntType, /* TinyIntType */ + ObIntType, /* SmallIntType */ + ObIntType, /* MediumIntType */ + ObIntType, /* Int32Type */ + ObIntType, /* IntType */ + ObIntType, /* UTinyIntType */ + ObIntType, /* USmallIntType */ + ObIntType, /* UMediumIntType */ + ObIntType, /* UInt32Type */ + ObIntType, /* UIntType */ + ObDoubleType, /* FloatType */ + ObDoubleType, /* DoubleType */ + ObDoubleType, /* UFloatType */ + ObDoubleType, /* UDoubleType */ + ObNumberType, /* NumberType */ + ObNumberType, /* UNumberType */ + ObMySQLDateTimeType, /* DateTimeType */ + ObMySQLDateTimeType, /* TimestampType */ + ObMySQLDateTimeType, /* DateType */ + ObMySQLDateTimeType, /* TimeType */ + ObIntType, /* YearType */ + ObVarcharType, /* VarcharType */ + ObVarcharType, /* CharType */ + ObVarcharType, /* HexStringType */ + ObMaxType, /* ExtendType */ + ObVarcharType, /* UnknownType */ + ObLongTextType, /* ObTinyTextType */ + ObLongTextType, /* ObTextType */ + ObLongTextType, /* ObMediumTextType */ + ObLongTextType, /* ObLongTextType */ + ObIntType, /* ObBitType */ + ObVarcharType, /* ObEnumType */ + ObVarcharType, /* ObSetType */ + ObMaxType, /* ObEnumInnerType */ + ObMaxType, /* ObSetInnerType */ + ObTimestampTZType, /* ObTimestampTZType */ + ObTimestampLTZType, /* ObTimestampLTZType */ + ObTimestampNanoType, /* ObTimestampNanoType */ + ObMaxType, /* ObRawType */ + ObMaxType, /* ObIntervalYMType */ + ObMaxType, /* ObIntervalDSType */ + ObVarcharType, /* ObNumberFloatType */ + ObNVarchar2Type, /* ObNVarchar2Type */ + ObNCharType, /* ObNCharType */ + ObMaxType, /* ObURowIDType */ + ObMaxType, /* ObLobType */ + ObVarcharType, /* ObJsonType */ + ObMaxType, /* ObGeometryType */ + ObMaxType, /* ObUserDefinedSQLType */ + ObDecimalIntType, /* ObDecimalIntType */ + ObMaxType, /* ObCollectionSQLType*/ + ObMySQLDateTimeType, /* ObMySQLDateType */ + ObMySQLDateTimeType, /* ObMySQLDateTimeType */ }, }; diff --git a/src/sql/engine/expr/ob_expr_round_result_type.map b/src/sql/engine/expr/ob_expr_round_result_type.map index d2845e8d1..c4da4e3d5 100644 --- a/src/sql/engine/expr/ob_expr_round_result_type.map +++ b/src/sql/engine/expr/ob_expr_round_result_type.map @@ -52,6 +52,8 @@ static constexpr ObObjType ROUND_RESULT_TYPE[ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObDecimalIntType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObDoubleType, /* ObMySQLDateType */ + ObDoubleType, /* ObMySQLDateTimeType */ }; static_assert(is_array_fully_initialized(ROUND_RESULT_TYPE), "ROUND_RESULT_TYPE is partially initlized"); \ No newline at end of file diff --git a/src/sql/engine/expr/ob_expr_sum_result_type.map b/src/sql/engine/expr/ob_expr_sum_result_type.map index e18bc9dd8..219c9db1d 100644 --- a/src/sql/engine/expr/ob_expr_sum_result_type.map +++ b/src/sql/engine/expr/ob_expr_sum_result_type.map @@ -52,6 +52,8 @@ static constexpr ObObjType SUM_RESULT_TYPE[ObMaxType] = ObMaxType, /* ObUserDefinedSQLType */ ObMaxType, /* ObDecimalIntType */ ObMaxType, /* ObCollectionSQLType */ + ObNumberType, /* ObMySQLDateType */ + ObNumberType, /* ObMySQLDateTimeType */ }; static_assert(is_array_fully_initialized(SUM_RESULT_TYPE), "SUM_RESULT_TYPE is partially initlized"); \ No newline at end of file diff --git a/src/sql/optimizer/ob_opt_est_parameter_normal.h b/src/sql/optimizer/ob_opt_est_parameter_normal.h index c79764ddf..e502e995d 100644 --- a/src/sql/optimizer/ob_opt_est_parameter_normal.h +++ b/src/sql/optimizer/ob_opt_est_parameter_normal.h @@ -120,6 +120,8 @@ const static double comparison_params_normal[ObMaxTC+1] = { NORMAL_CMP_CHAR_COST, // user defined type NORMAL_CMP_NUMBER_COST, // ObDecimalIntTC NORMAL_CMP_CHAR_COST, // collection sql type + NORMAL_CMP_INT_COST, // mysql date + NORMAL_CMP_INT_COST, // mysql datetime }; const static double hash_params_normal[ObMaxTC+1] = { @@ -150,6 +152,8 @@ const static double hash_params_normal[ObMaxTC+1] = { NORMAL_HASH_CHAR_COST, // user defined type NORMAL_HASH_NUMBER_COST, // ObDecimalIntTC NORMAL_HASH_CHAR_COST, // collection sql type + NORMAL_HASH_INT_COST, // mysql date + NORMAL_HASH_INT_COST, // mysql datetime }; const static double project_params_normal[2][2][MAX_PROJECT_TYPE] = { diff --git a/src/storage/blocksstable/encoding/ob_encoding_util.h b/src/storage/blocksstable/encoding/ob_encoding_util.h index 3dcfb2bbb..3c1fdf07d 100644 --- a/src/storage/blocksstable/encoding/ob_encoding_util.h +++ b/src/storage/blocksstable/encoding/ob_encoding_util.h @@ -120,6 +120,8 @@ OB_INLINE ObObjTypeStoreClass *get_store_class_map() ObStringSC, // ObUserDefinedSQLTC, UDT null_bitmaps ObDecimalIntSC, // ObDecimalIntTC ObTextSC, // ObCollectionSQLTC + ObIntSC, // ObMySQLDateTC + ObIntSC, // ObMySQLDateTimeTc ObMaxSC // ObMaxTC }; STATIC_ASSERT(ARRAYSIZEOF(store_class_map) == common::ObMaxTC + 1, @@ -182,6 +184,8 @@ OB_INLINE int64_t *get_type_size_map() -1, //ObUserDefinedSQLType -1, //ObDecimalIntType -1, //ObCollectionSQLType + 4, // ObMySQLDateType + 8, // ObMySQLDateTimeType -1 // ObMaxType }; STATIC_ASSERT(ARRAYSIZEOF(type_size_map) == common::ObMaxType + 1, @@ -245,6 +249,8 @@ OB_INLINE int64_t *get_estimate_base_store_size_map() 8, // ObUserDefinedSQLType 8, // ObDecimalIntType 8, // ObCollectionSQLType + 8, // ObMySQLDateType + 8, // ObMySQLDateTimeType -1 // ObMaxType }; STATIC_ASSERT(ARRAYSIZEOF(estimate_base_store_size_map) == common::ObMaxType + 1, diff --git a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type.result b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type.result index 3da2f8826..b5f5e7e29 100644 --- a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type.result +++ b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type.result @@ -53,6 +53,8 @@ data_type data_type_str data_type_class 49 UDT 24 50 DECIMAL_INT 25 51 COLLECTION 26 +52 MYSQL_DATE 27 +53 MYSQL_DATETIME 28 select data_type, data_type_str, data_type_class from __all_virtual_data_type order by data_type; data_type data_type_str data_type_class 0 NULL 0 @@ -107,6 +109,8 @@ data_type data_type_str data_type_class 49 UDT 24 50 DECIMAL_INT 25 51 COLLECTION 26 +52 MYSQL_DATE 27 +53 MYSQL_DATETIME 28 select * from __all_virtual_data_type where data_type = 22; data_type data_type_str data_type_class 22 VARCHAR 10 @@ -162,6 +166,8 @@ GEOMETRY GEOMETRY UDT UDT DECIMAL_INT DECIMAL_INT COLLECTION COLLECTION +MYSQL_DATE MYSQL_DATE +MYSQL_DATETIME MYSQL_DATETIME show create table __all_virtual_data_type; Table Create Table __all_virtual_data_type CREATE TABLE `__all_virtual_data_type` ( diff --git a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type_class.result b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type_class.result index e1f77e9be..2bdbd2ba3 100644 --- a/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type_class.result +++ b/tools/deploy/mysql_test/test_suite/inner_table/r/mysql/all_virtual_data_type_class.result @@ -27,6 +27,8 @@ data_type_class data_type_class_str 24 UDT 25 DECIMAL_INT 26 COLLECTION +27 MYSQL_DATE +28 MYSQL_DATETIME select data_type_class, data_type_class_str from __all_virtual_data_type_class; data_type_class data_type_class_str 0 NULL @@ -55,6 +57,8 @@ data_type_class data_type_class_str 24 UDT 25 DECIMAL_INT 26 COLLECTION +27 MYSQL_DATE +28 MYSQL_DATETIME select * from __all_virtual_data_type_class where data_type_class = 10; data_type_class data_type_class_str 10 STRING @@ -110,6 +114,8 @@ GEOMETRY GEOMETRY UDT UDT DECIMAL_INT DECIMAL_INT COLLECTION COLLECTION +MYSQL_DATE MYSQL_DATE +MYSQL_DATETIME MYSQL_DATETIME show create table __all_virtual_data_type_class; Table Create Table __all_virtual_data_type_class CREATE TABLE `__all_virtual_data_type_class` ( diff --git a/unittest/share/test_defined_expr_func_by_type.result b/unittest/share/test_defined_expr_func_by_type.result index 7ec6b17a6..10913af43 100644 --- a/unittest/share/test_defined_expr_func_by_type.result +++ b/unittest/share/test_defined_expr_func_by_type.result @@ -52,6 +52,8 @@ : not defined : defined : defined + : defined + : defined /**************** TINYINT ****************/ @@ -107,6 +109,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SMALLINT ****************/ @@ -162,6 +166,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMINT ****************/ @@ -217,6 +223,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INT ****************/ @@ -272,6 +280,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIGINT ****************/ @@ -327,6 +337,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TINYINT UNSIGNED ****************/ @@ -382,6 +394,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SMALLINT UNSIGNED ****************/ @@ -437,6 +451,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMINT UNSIGNED ****************/ @@ -492,6 +508,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INT UNSIGNED ****************/ @@ -547,6 +565,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIGINT UNSIGNED ****************/ @@ -602,6 +622,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** FLOAT ****************/ @@ -657,6 +679,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DOUBLE ****************/ @@ -712,6 +736,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** FLOAT UNSIGNED ****************/ @@ -767,6 +793,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DOUBLE UNSIGNED ****************/ @@ -822,6 +850,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL ****************/ @@ -877,6 +907,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL UNSIGNED ****************/ @@ -932,6 +964,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DATETIME ****************/ @@ -987,6 +1021,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP ****************/ @@ -1042,6 +1078,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DATE ****************/ @@ -1097,6 +1135,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIME ****************/ @@ -1152,6 +1192,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** YEAR ****************/ @@ -1207,6 +1249,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** VARCHAR ****************/ @@ -1262,6 +1306,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** CHAR ****************/ @@ -1317,6 +1363,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** HEX_STRING ****************/ @@ -1372,6 +1420,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** EXT ****************/ @@ -1427,6 +1477,8 @@ : not defined : defined : defined + : defined + : defined /**************** UNKNOWN ****************/ @@ -1482,6 +1534,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TINYTEXT ****************/ @@ -1537,6 +1591,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TEXT ****************/ @@ -1592,6 +1648,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMTEXT ****************/ @@ -1647,6 +1705,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** LONGTEXT ****************/ @@ -1702,6 +1762,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIT ****************/ @@ -1757,6 +1819,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ENUM ****************/ @@ -1812,6 +1876,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SET ****************/ @@ -1867,6 +1933,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ENUM_INNER ****************/ @@ -1922,6 +1990,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SET_INNER ****************/ @@ -1977,6 +2047,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP_WITH_TIME_ZONE ****************/ @@ -2032,6 +2104,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP_WITH_LOCAL_TIME_ZONE ****************/ @@ -2087,6 +2161,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP ****************/ @@ -2142,6 +2218,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** RAW ****************/ @@ -2197,6 +2275,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INTERVAL_YEAR_TO_MONTH ****************/ @@ -2252,6 +2332,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INTERVAL_DAY_TO_SECOND ****************/ @@ -2307,6 +2389,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NUMBER_FLOAT ****************/ @@ -2362,6 +2446,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NVARCHAR2 ****************/ @@ -2417,6 +2503,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NCHAR ****************/ @@ -2472,6 +2560,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ROWID ****************/ @@ -2527,6 +2617,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** LOB ****************/ @@ -2582,6 +2674,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** JSON ****************/ @@ -2637,6 +2731,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** GEOMETRY ****************/ @@ -2692,6 +2788,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** UDT ****************/ @@ -2747,6 +2845,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL_INT ****************/ @@ -2802,6 +2902,8 @@ : not defined : defined : not defined + : not defined + : not defined /**************** COLLECTION ****************/ @@ -2857,4 +2959,120 @@ : not defined : not defined : not defined + : not defined + : not defined + +/**************** MYSQL_DATE ****************/ + + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + +/**************** MYSQL_DATETIME ****************/ + + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined diff --git a/unittest/share/test_defined_func_by_type.result b/unittest/share/test_defined_func_by_type.result index 7ec6b17a6..10913af43 100644 --- a/unittest/share/test_defined_func_by_type.result +++ b/unittest/share/test_defined_func_by_type.result @@ -52,6 +52,8 @@ : not defined : defined : defined + : defined + : defined /**************** TINYINT ****************/ @@ -107,6 +109,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SMALLINT ****************/ @@ -162,6 +166,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMINT ****************/ @@ -217,6 +223,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INT ****************/ @@ -272,6 +280,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIGINT ****************/ @@ -327,6 +337,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TINYINT UNSIGNED ****************/ @@ -382,6 +394,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SMALLINT UNSIGNED ****************/ @@ -437,6 +451,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMINT UNSIGNED ****************/ @@ -492,6 +508,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INT UNSIGNED ****************/ @@ -547,6 +565,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIGINT UNSIGNED ****************/ @@ -602,6 +622,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** FLOAT ****************/ @@ -657,6 +679,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DOUBLE ****************/ @@ -712,6 +736,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** FLOAT UNSIGNED ****************/ @@ -767,6 +793,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DOUBLE UNSIGNED ****************/ @@ -822,6 +850,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL ****************/ @@ -877,6 +907,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL UNSIGNED ****************/ @@ -932,6 +964,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DATETIME ****************/ @@ -987,6 +1021,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP ****************/ @@ -1042,6 +1078,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DATE ****************/ @@ -1097,6 +1135,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIME ****************/ @@ -1152,6 +1192,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** YEAR ****************/ @@ -1207,6 +1249,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** VARCHAR ****************/ @@ -1262,6 +1306,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** CHAR ****************/ @@ -1317,6 +1363,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** HEX_STRING ****************/ @@ -1372,6 +1420,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** EXT ****************/ @@ -1427,6 +1477,8 @@ : not defined : defined : defined + : defined + : defined /**************** UNKNOWN ****************/ @@ -1482,6 +1534,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TINYTEXT ****************/ @@ -1537,6 +1591,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TEXT ****************/ @@ -1592,6 +1648,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** MEDIUMTEXT ****************/ @@ -1647,6 +1705,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** LONGTEXT ****************/ @@ -1702,6 +1762,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** BIT ****************/ @@ -1757,6 +1819,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ENUM ****************/ @@ -1812,6 +1876,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SET ****************/ @@ -1867,6 +1933,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ENUM_INNER ****************/ @@ -1922,6 +1990,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** SET_INNER ****************/ @@ -1977,6 +2047,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP_WITH_TIME_ZONE ****************/ @@ -2032,6 +2104,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP_WITH_LOCAL_TIME_ZONE ****************/ @@ -2087,6 +2161,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** TIMESTAMP ****************/ @@ -2142,6 +2218,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** RAW ****************/ @@ -2197,6 +2275,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INTERVAL_YEAR_TO_MONTH ****************/ @@ -2252,6 +2332,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** INTERVAL_DAY_TO_SECOND ****************/ @@ -2307,6 +2389,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NUMBER_FLOAT ****************/ @@ -2362,6 +2446,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NVARCHAR2 ****************/ @@ -2417,6 +2503,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** NCHAR ****************/ @@ -2472,6 +2560,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** ROWID ****************/ @@ -2527,6 +2617,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** LOB ****************/ @@ -2582,6 +2674,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** JSON ****************/ @@ -2637,6 +2731,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** GEOMETRY ****************/ @@ -2692,6 +2788,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** UDT ****************/ @@ -2747,6 +2845,8 @@ : not defined : not defined : not defined + : not defined + : not defined /**************** DECIMAL_INT ****************/ @@ -2802,6 +2902,8 @@ : not defined : defined : not defined + : not defined + : not defined /**************** COLLECTION ****************/ @@ -2857,4 +2959,120 @@ : not defined : not defined : not defined + : not defined + : not defined + +/**************** MYSQL_DATE ****************/ + + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + +/**************** MYSQL_DATETIME ****************/ + + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined + : not defined diff --git a/unittest/storage/blocksstable/test_row_reader.cpp b/unittest/storage/blocksstable/test_row_reader.cpp index bedc080a1..d47aaa240 100644 --- a/unittest/storage/blocksstable/test_row_reader.cpp +++ b/unittest/storage/blocksstable/test_row_reader.cpp @@ -57,9 +57,10 @@ public: // Every ObObjType from ObTinyIntType to ObHexStringType inclusive. // Skip ObNullType and ObExtendType because for external usage, a column type // can't be NULL or NOP. - ObObjType not_test_type[11] = { + ObObjType not_test_type[13] = { ObNullType, ObExtendType, ObUnknownType, ObEnumInnerType, ObSetInnerType, - ObNumberFloatType, ObURowIDType, ObLobType, ObUserDefinedSQLType, ObDecimalIntType, ObCollectionSQLType}; + ObNumberFloatType, ObURowIDType, ObLobType, ObUserDefinedSQLType, ObDecimalIntType, + ObCollectionSQLType, ObMySQLDateType, ObMySQLDateTimeType}; static const int64_t column_num = ObMaxType - sizeof(not_test_type) / sizeof(ObObjType); public: TestNewRowReader()