Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 185E318F73 for ; Tue, 4 Aug 2015 00:59:05 +0000 (UTC) Received: (qmail 64545 invoked by uid 500); 4 Aug 2015 00:59:05 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 64392 invoked by uid 500); 4 Aug 2015 00:59:04 -0000 Mailing-List: contact issues-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 issues@drill.apache.org Received: (qmail 64202 invoked by uid 99); 4 Aug 2015 00:59:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Aug 2015 00:59:04 +0000 Date: Tue, 4 Aug 2015 00:59:04 +0000 (UTC) From: "Aman Sinha (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-2852) CASTing the column 'dir0' in view causes partition pruning to fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-2852?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aman Sinha updated DRILL-2852: ------------------------------ Assignee: Jinfeng Ni (was: Aman Sinha) > CASTing the column 'dir0' in view causes partition pruning to fail > ------------------------------------------------------------------- > > Key: DRILL-2852 > URL: https://issues.apache.org/jira/browse/DRILL-2852 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 0.8.0 > Reporter: Aman Sinha > Assignee: Jinfeng Ni > Fix For: 1.2.0 > > > If the partition column 'dir0' is CAST inside a view and the query has a filter on that column, then partition pruning interpreter evaluator encounters an AssertionError. > Table data in the example below is from test/resources/multilevel/parquet. > {code} > create view dfs.tmp.myview2 as select cast(dir0 as varchar(100)) as myyear, dir1 as myquarter, o_totalprice from `multilevel/parquet` ; > select * from dfs.tmp.myview2 where myyear = '1995' and myquarter = 'Q2' and o_totalprice < 40000.0; > {code} > Failure stack trace: > {code} > Caused by: java.lang.AssertionError: Internal error: Error while applying rule PruneScanRule:Filter_On_Project, > ... > > Caused by: java.lang.AssertionError: null > at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.isBitOn(InterpreterEvaluator.java:490) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitBooleanAnd(InterpreterEvaluator.java:434) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitBooleanOperator(InterpreterEvaluator.java:332) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitBooleanOperator(InterpreterEvaluator.java:147) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.common.expression.BooleanOperator.accept(BooleanOperator.java:36) ~[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluate(InterpreterEvaluator.java:80) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > at org.apache.drill.exec.planner.logical.partition.PruneScanRule.doOnMatch(PruneScanRule.java:224) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)