soumyakanti3578 commented on PR #4936: URL: https://github.com/apache/hive/pull/4936#issuecomment-1854437233
Thanks for commenting on the PR. I have seen a case in production where the customer uses a DECIMAL(5, 0) column of a table as the second argument of `add_months`. Since a decimal with scale zero can always be represented as a whole number, I think the customer's case can be supported. But I agree that this is a bad pattern on their end. I also think we should limit the precision of the DECIMAL because we use `add(int field, int amount)` method of `java.util.Calendar`, where the `amount` type is an `int`. Regarding the change being in the base class, maybe I can create a new child class and override the method `obtainIntConverter` only for `add_months`. -- 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]
