dajiaohuang opened a new pull request, #6913: URL: https://github.com/apache/hive/pull/6913
### What changes were proposed in this pull request? For FX parsing, compare the input separator against the pattern separator after excluding a terminal `-` when it is the timezone sign immediately before `TZH`, matching the existing separator parser rule. Add coverage for both timezone signs and for continued rejection of a malformed separator. ### Why are the changes needed? This fixes [HIVE-30206](https://issues.apache.org/jira/browse/HIVE-30206): a multi-character separator ending in `-` before `TZH` cannot be parsed with `FX`, even though the same pattern works without `FX` and the formatter treats that terminal hyphen as the timezone sign. ### Does this PR introduce any user-facing change? Yes. `FXyyyy-mm-dd -tzh:tzm` now parses timestamps with `-07:00` and `+07:00`; an input with an extra separator character remains rejected by FX exactness. ### How was this patch tested? The targeted `TestHiveSqlDateTimeFormatter` class passed: 14 tests, 0 failures/errors, using JDK 21 and Maven 3.9.16 with `-pl common -am -Dtest=TestHiveSqlDateTimeFormatter -Dmaven.antrun.skip=true`. This was a targeted test run in a sparse checkout; the full Hive build and CI were not run. -- 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]
