sohami commented on a change in pull request #1453: DRILL-6710: Disallow
negative scale for decimal data type
URL: https://github.com/apache/drill/pull/1453#discussion_r214160850
##########
File path:
exec/java-exec/src/main/codegen/templates/Decimal/DecimalAggrTypeFunctions1.java
##########
@@ -92,6 +92,8 @@ public void add() {
if (outputScale.value == Integer.MIN_VALUE) {
outputScale.value = in.scale;
Review comment:
it looks like `outputScale.value` is initialized to first input value scale
and later in `output` function below we are setting `out.scale as
min(outputScale.value, MaxScale)`. Shouldn't we limit scale here as well such
that we don't end up passing much bigger scale in `checkValueOverflow() `?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services