Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 638A3200B6D for ; Tue, 9 Aug 2016 02:00:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6212B160AB3; Tue, 9 Aug 2016 00:00:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A3720160A91 for ; Tue, 9 Aug 2016 02:00:44 +0200 (CEST) Received: (qmail 65228 invoked by uid 500); 9 Aug 2016 00:00:43 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 65217 invoked by uid 99); 9 Aug 2016 00:00:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Aug 2016 00:00:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 29231DFCC0; Tue, 9 Aug 2016 00:00:43 +0000 (UTC) From: amansinha100 To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #517: DRILL-4704 fix Content-Type: text/plain Message-Id: <20160809000043.29231DFCC0@git1-us-west.apache.org> Date: Tue, 9 Aug 2016 00:00:43 +0000 (UTC) archived-at: Tue, 09 Aug 2016 00:00:45 -0000 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 infrastructure@apache.org or file a JIRA ticket with INFRA. ---