Github user jinfengni commented on the issue:
https://github.com/apache/drill/pull/517
I'm not fully convinced that we should check the precision for each input
value for this castIntDecimal function.
The argument of proposed patch is parameter "precision=0" is not valid, and
has to be calculated on-the-fly or "dynamically" for each input value. To me,
1) if "precision=0" is a wrong input to this function, then we should fix the
place where precision=0 is passed in. 2) why would you treat "precision=0"
only? what if I pass in "precision = 1", and a integer value of 123456? in
such case, do we think "precison=1" is valid or not?
Regarding the overflow problem, that seems to be a separate issue, and
probably is true for most of the existing decimal functions.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---