ShubhamChaurasia edited a comment on pull request #2591: URL: https://github.com/apache/hive/pull/2591#issuecomment-903457697
> LGTM, I would request only minor changes, otherwise, it's +1: > there are another UDFs using formatter, please check those also, especially VectorUDFDateDiffColCol which seems to do the same wrong behavior > > ``` > date.setTime(formatter.parse(string).getTime()); > output.vector[i] = DateWritableV2.dateToDays(date); > ``` > > also if you want to use timezone hack in qtest, feel free to use this feature: > https://github.com/apache/hive/blob/master/itests/util/src/main/java/org/apache/hadoop/hive/ql/qoption/QTestTimezoneHandler.java Thanks @abstractdog for the review. Nice catch. I have corrected VectorUDFDateDiffColCol as well. Also added a qtest in addition to unit tests. Also, I verified that other UDFs either use DateParser in hive to obtain a Hive Date which can be converted to epoch day/millis or they use formatter with zone (so they don't assume a zone). -- 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]
