Github user amansinha100 commented on a diff in the pull request:
https://github.com/apache/drill/pull/517#discussion_r73978291
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/expr/ExpressionTreeMaterializer.java
---
@@ -267,6 +267,17 @@ public LogicalExpression
visitBooleanOperator(BooleanOperator op, FunctionLookup
return new BooleanOperator(op.getName(), args, op.getPosition());
}
+ static public int computePrecision(LogicalExpression currentArg) {
+ int precision = currentArg.getMajorType().getPrecision();
--- End diff --
Did you consider checking whether the type has a precision or not using
getMajorType().hasPrecision() ? That way, you would only call getPrecision()
if it returned True and otherwise set the precision for INT, BIGINT.
---
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.
---