924060929 commented on PR #67238: URL: https://github.com/apache/doris/pull/67238#issuecomment-6594257257
There is still a reproducible bug on the current head `7056a0d2a7`: the new VARCHAR overload selection turns previously valid `hours_diff` results into NULL or a query error for accepted historical timezone offsets. For VARCHAR columns containing: ```text a = 1800-01-01 01:00:00-14:21 b = 1800-01-01 00:00:00-14:21 ``` `hours_diff(a, b)` should return **1**. I executed this against a FE built from the PR base `f1fd1b432f` and the current PR FE, using the same local ASAN BE (there is no BE source diff), with `time_zone='+08:00'` and `debug_skip_fold_constant=true` to ensure BE execution over stored VARCHAR values: | Test | Base FE | PR FE | | --- | --- | --- | | `hours_diff(a,b)`, `enable_strict_cast=false` | 1 | **NULL** | | `hours_diff(a,b)`, `enable_strict_cast=true` | 1 | **Query fails** | | Explicitly cast both columns to `TIMESTAMPTZ(6)`, either mode | 1 | 1 | The strict-mode error is: ```text [INVALID_ARGUMENT]parse 1800-01-01 01:00:00-14:21 to datetime failed: invalid minute offset '21' ``` The cause is the overload change: EXPLAIN shows TIMESTAMPTZ casts on the base and DATETIMEV2 casts on the PR. DATETIMEV2's existing parser rejects offset minutes other than 00/30/45, while TIMESTAMPTZ accepts this input. Changing the offset to `-13:21` produces the same regression. Passing the original values directly as literals still returns 1 on both versions. Please preserve these accepted zoned VARCHAR inputs while fixing the zone-less-string case, and add a stored-VARCHAR regression covering both strict-cast modes. The full reproduction SQL and execution details are in [the inline follow-up](https://github.com/apache/doris/pull/67238#discussion_r4441958425). -- 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]
