zabetak opened a new pull request, #4615: URL: https://github.com/apache/hive/pull/4615
### What changes were proposed in this pull request? 1. Add hive.datetime.formatter property to control formatter in unix_timestamp and from_unixtime functions. 2. Add UnixTimeFormatter class (TODO javadoc) hierarchy for encapsulating formatting and parsing of unixtime based on the configuration. 3. Refactor unix_timestamp (+vectorized) and from_unixtime implementations to use the new formatter classes. 4. Add parameterized unit tests for the affected UDF implementations. ### Why are the changes needed? The two Java formatters present diffences in their behavior leading to different query results. The supported patterns, between the two formatters, are also different something that makes existing queries crash at runtime (after upgrade). Adapting to the new behavior of DateTimeFormatter is a challenging and time-consuming task for end users especially due to the widespread use of the afforementioned unixtime functions. Although DateTimeFormatter is a clear improvement over SimpleDateFormat some users still want to retain the old behavior for compatibility reasons thus introducing a property is necessary for facilitating migration. ### Does this PR introduce _any_ user-facing change? Yes, adds a new property that users can tune to change the behavior of `unix_timestamp` and `from_unixtime` functions. ### Is the change a dependency upgrade? No ### How was this patch tested? New + existing tests -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org