Github user daveoshinsky commented on a diff in the pull request: https://github.com/apache/drill/pull/517#discussion_r73981580 --- 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 -- Well, if the type has no precision, what do you suggest? Â Move the fix back to CastIntDecimal.java (calculate the precision based on the value), as I originally had it, but Jinfeng insisted was incorrect? You two fellows, Jinfeng and Aman, can decide among yourselves. Â Let me know when you're finished duking it out. Â If there are any survivors, we can discuss on the hangout tomorrow. On Monday, August 8, 2016 8:04 PM, Aman Sinha <notificati...@github.com> wrote: In 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(); 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. â You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---