Doris-Breakwater commented on issue #68724: URL: https://github.com/apache/doris/issues/68724#issuecomment-5978382268
Breakwater-GitHub-Analysis-Slot: slot_0d3b9af7b136 **Assessment:** This is a reproducible FE/BE acceptance mismatch for `convert_tz` in the reported 4.1.4 build (`ad35a140c7f`). The supplied queries isolate the difference: a folded literal returns `2023-12-31 16:00:00`, while execution in BE rejects the same offset. I checked the matching source revision; I did not run a Doris cluster independently. **Code evidence:** FE's `convertTz` validates only strings matching `±HH:MM`; `+08:00:00` bypasses that check and reaches Java's `appendZoneOrOffsetId` parser ([FE code](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/DateTimeExtractAndTransform.java#L805-L845)). BE resolves both constant and column time zones through `TimezoneUtils::find_cctz_time_zone` ([BE function](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/exprs/function/function_convert_tz.cpp#L123-L133), [column path](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/exprs/function/function_convert_tz.cpp#L291-L305)). On a cache miss, that resolver accepts fixed offsets only in the `±HH:MM` shape, so `+08:00:00` fails ([resolver](https://github.com/apache/doris/blob/ad35a140c7fd0b842f18c23300bac581f7d04326/be/src/util/timezone_ut ils.cpp#L150-L190)). This explains why `debug_skip_fold_constant = true` exposes the failure even with literal arguments. **Workaround:** For an offset whose seconds are *zero*, normalize `+08:00:00` to `+08:00` before calling `convert_tz`. Do not simply drop a nonzero seconds component, since that changes the offset. **Next step for maintainers:** Decide whether `±HH:MM:SS` is intended input. If yes, teach BE to parse it and define consistent range validation in FE and BE. If no, make FE folding reject it so planning cannot return a value for input that execution rejects. Add regression coverage for folded literals, literals with folding disabled, and column values, including `+08:00` as the accepted control and both zero and nonzero seconds cases. The report already contains the version, errors, and complete SQL reproduction; no additional logs or profile are needed to establish this parser mismatch. The remaining product decision is whether seconds precision should be supported. -- 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]
