Add normal_date_expr to the rewriting phase to solve the problem of comparing illegal date constants with date columns.

This commit is contained in:
obdev
2023-09-11 07:10:42 +00:00
committed by ob-robot
parent 68d091760c
commit 794549cf22
12 changed files with 705 additions and 10 deletions

View File

@ -1068,4 +1068,5 @@
#define N_UPDATEXML "updatexml"
#define N_NLS_INITCAP "nls_initcap"
#define N_TEMP_TABLE_SSID "temp_table_ssid"
#define N_ALIGN_DATE4CMP "align_date4cmp"
#endif //OCEANBASE_LIB_OB_NAME_DEF_H_

View File

@ -635,6 +635,9 @@ public:
ObYearWeekWdaySpec spec_[YEAR_WEEK_WDAY_COUNT];
}
*/
public:
static int validate_datetime(ObTime &ob_time, const bool is_dayofmonth,
const ObDateSqlMode date_sql_mode);
private:
// date add / sub / diff.
static int merge_date_interval(int64_t base_value, const ObString &interval_str,
@ -644,8 +647,6 @@ private:
const ObDateSqlMode date_sql_mode);
// other utility functions.
static int validate_year(int64_t year);
static int validate_datetime(ObTime &ob_time, const bool is_dayofmonth,
const ObDateSqlMode date_sql_mode);
static int validate_oracle_timestamp(const ObTime &ob_time);
static int validate_basic_part_of_ob_time_oracle(const ObTime &ob_time);
static int validate_tz_part_of_ob_time_oracle(const ObTime &ob_time);