drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3568) Exception when NOT condition is used with the column name
Date Tue, 28 Jul 2015 00:38:05 GMT
Victoria Markman created DRILL-3568:
---------------------------------------

             Summary: Exception when NOT condition is used with the column name
                 Key: DRILL-3568
                 URL: https://issues.apache.org/jira/browse/DRILL-3568
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.1.0
            Reporter: Victoria Markman
            Assignee: Jinfeng Ni
            Priority: Minor


Exception:
{code}
0: jdbc:drill:drillbit=localhost> select a1 from t1 where not a1;
Error: SYSTEM ERROR: ClassCastException: org.apache.calcite.rex.RexInputRef cannot be cast
to org.apache.calcite.rex.RexCall
[Error Id: bdf6251a-0649-4d0c-8fd2-466058aebd3b on 172.16.1.129:31010] (state=,code=0)
{code}

drillbit.log
{code}
Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during
fragment initialization: Internal error: Error while applying rule DrillReduceExpressionsRule(Filter),
args [rel#254574:LogicalFilter.NONE.ANY([]).[](input=rel#254573:Subset#3.NONE.ANY([]).[],condition=NOT($0))]
        ... 4 common frames omitted
Caused by: java.lang.AssertionError: Internal error: Error while applying rule DrillReduceExpressionsRule(Filter),
args [rel#254574:LogicalFilter.NONE.ANY([]).[](input=rel#254573:Subset#3.NONE.ANY([]).[],condition=NOT($0))]
        at org.apache.calcite.util.Util.newInternal(Util.java:790) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:795)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:303) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:316) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.logicalPlanningVolcanoAndLopt(DefaultSqlHandler.java:528)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:213)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:248)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:164)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:178)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:903) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:242) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        ... 3 common frames omitted
Caused by: java.lang.ClassCastException: org.apache.calcite.rex.RexInputRef cannot be cast
to org.apache.calcite.rex.RexCall
        at org.apache.calcite.rel.rules.ReduceExpressionsRule$ReduceFilterRule.onMatch(ReduceExpressionsRule.java:160)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        ... 13 common frames omitted
2015-07-27 17:27:35,634 [2a493387-a322-461b-730c-2d475911e25e:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- State change requested.  PENDING --> FAILED
org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: Internal error: Error while applying rule DrillReduceExpressionsRule(Filter),
args [rel#254602:LogicalFilter.NONE.ANY([]).[](input=rel#254601:Subset#3.NONE.ANY([]).[],condition=NOT($0))]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:253) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_71]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_71]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_71]
Caused by: java.lang.AssertionError: Internal error: Error while applying rule DrillReduceExpressionsRule(Filter),
args [rel#254602:LogicalFilter.NONE.ANY([]).[](input=rel#254601:Subset#3.NONE.ANY([]).[],condition=NOT($0))]
        at org.apache.calcite.util.Util.newInternal(Util.java:790) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:795)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:303) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:316) ~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.logicalPlanningVolcanoAndLopt(DefaultSqlHandler.java:528)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:213)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:248)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:164)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:178)
~[drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:903) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:242) [drill-java-exec-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
        ... 3 common frames omitted
Caused by: java.lang.ClassCastException: org.apache.calcite.rex.RexInputRef cannot be cast
to org.apache.calcite.rex.RexCall
        at org.apache.calcite.rel.rules.ReduceExpressionsRule$ReduceFilterRule.onMatch(ReduceExpressionsRule.java:160)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228)
~[calcite-core-1.1.0-drill-r14.jar:1.1.0-drill-r14]
        ... 13 common frames omitted
{code}

Works:
{code}
0: jdbc:drill:drillbit=localhost> select a1 from t1 where not true;
+-----+
| a1  |
+-----+
+-----+
No rows selected (0.079 seconds)


0: jdbc:drill:drillbit=localhost> select a1 from t1 where not false;
+-------+
|  a1   |
+-------+
| 1     |
| 2     |
| 3     |
| 4     |
| 5     |
| 6     |
| 7     |
| null  |
| 9     |
| 10    |
+-------+
10 rows selected (0.079 seconds)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message