Github user vvysotskyi commented on a diff in the pull request:
https://github.com/apache/drill/pull/570#discussion_r161002913
--- Diff:
common/src/main/java/org/apache/drill/common/util/CoreDecimalUtility.java ---
@@ -32,6 +32,14 @@ public static long getDecimal18FromBigDecimal(BigDecimal
input, int scale, int p
}
public static int getMaxPrecision(TypeProtos.MinorType decimalType) {
+/*
--- End diff --
This method is used in `TypeCastRules.getCost()` and in
`CoreDecimalUtility.getPrecisionRange()`.
Regarding its usage in `TypeCastRules.getCost()`, we may return
`RelDataTypeSystem.getMaxNumericPrecision()` for VarDecimal.
But regarding its usage in `CoreDecimalUtility.getPrecisionRange()` method,
`getPrecisionRange()` is used in DecimalScalePrecisionFunction classes for
calculating resulting precision. I suppose these methods should be rewritten in
the same way as it is implemented in Calcite `RelDataTypeFactoryImpl`. But I
think it would be better to make these changes in separate Jira.
But now please remove these comments.
---