Mryange opened a new pull request, #67064: URL: https://github.com/apache/doris/pull/67064
Datetime string casts with explicit numeric offsets behaved differently between FE constant folding and BE runtime evaluation. Negative offsets below `-12:00` could be accepted by FE but rejected by BE, while TIMESTAMPTZ folding did not consistently validate invalid offset minutes. The [official datetime conversion documentation](https://doris.apache.org/zh-CN/docs/dev/sql-manual/basic-element/sql-data-types/conversion/datetime-conversion) defines numeric offsets in datetime CAST input as follows: - the offset range is `[-14:00, +14:00]`; - the minute component must be `00`, `30`, or `45`; - at the `-14:00` and `+14:00` boundaries, the minute component must be `00`. Root cause: FE constant folding and BE runtime parsing used different validation paths and boundary rules. This change routes FE string-to-TIMESTAMPTZ folding through the shared datetime cast path and makes the BE timezone offset parser accept the symmetric documented range. CAST-specific minute validation remains in datetime parsing; generic session time zone parsing continues to accept valid offsets with arbitrary minute values, such as `+08:17`. Regression coverage compares folded and runtime casts for DATE, DATEV2, DATETIME, DATETIMEV2, and TIMESTAMPTZ, including valid boundaries, supported minutes, invalid minutes, lambda expressions, and a session time zone with arbitrary minutes. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
