drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Nadeau (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-3286) IN clause with null in it results in AssertionError: Error while applying rule DrillValuesRule
Date Wed, 01 Jul 2015 01:02:07 GMT

     [ https://issues.apache.org/jira/browse/DRILL-3286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jacques Nadeau updated DRILL-3286:
----------------------------------
    Fix Version/s: 1.1.0

> IN clause with null in it results in AssertionError: Error while applying rule DrillValuesRule
> ----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3286
>                 URL: https://issues.apache.org/jira/browse/DRILL-3286
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.0.0
>         Environment: 3bccec9110c7ff86fa3cf04baa81a1747e1f5b9e
>            Reporter: Khurram Faraaz
>            Assignee: Jinfeng Ni
>             Fix For: 1.1.0
>
>
> Query that uses IN clause and there is a null as a value specified inside the IN clause
we see an UnsupportedOperationException and AssertionError: Internal error: Error while applying
rule DrillValuesRule.
> Test was executed on 4 node cluster on CentOS.
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select * from tblWnulls where c2 in ('a','b','c',null);
> Error: SYSTEM ERROR: java.lang.UnsupportedOperationException: Unable to convert the value
of null and type ANY to a Drill constant expression.
> [Error Id: ecd34f5c-ca9e-46a1-87bb-f7257b155de4 on centos-01.qa.lab:31010] (state=,code=0)
> {code}
> Data in the table (it is coming from a Parquet file)
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select c1, c2 from tblWnulls;
> +-------------+-------+
> |     c1      |  c2   |
> +-------------+-------+
> | 1           | a     |
> | 2           | b     |
> | 13          | c     |
> | 4           | c     |
> | 5           | a     |
> | 6           | c     |
> | null        | d     |
> | 17          | b     |
> | 8           | c     |
> | 9           | b     |
> | 10          | d     |
> | 2147483647  | d     |
> | 10          | a     |
> | 11          | a     |
> | null        | c     |
> | 11          | d     |
> | 12          | c     |
> | 19          | null  |
> | 13          | b     |
> | 14          | a     |
> | 13          | c     |
> | 15          | e     |
> | -1          | e     |
> | 0           | a     |
> | 2147483647  | d     |
> | null        | d     |
> | 65536       | null  |
> | 1000000     | null  |
> | null        | null  |
> | 11111       | a     |
> +-------------+-------+
> 30 rows selected (0.169 seconds)
> {code}
> Stack trace from dill bit.log
> {code}
> [Error Id: ecd34f5c-ca9e-46a1-87bb-f7257b155de4 on centos-01.qa.lab:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: java.lang.UnsupportedOperationException:
Unable to convert the value of null and type ANY to a Drill constant expression.
> [Error Id: ecd34f5c-ca9e-46a1-87bb-f7257b155de4 on centos-01.qa.lab:31010]
>         at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:522)
~[drill-common-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:738)
[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:840)
[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.processEvent(Foreman.java:782)
[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.common.EventProcessor.sendEvent(EventProcessor.java:73) [drill-common-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman$StateSwitch.moveToState(Foreman.java:784)
[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:893) [drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:253) [drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_45]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_45]
>         at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
> Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception
during fragment initialization: Internal error: Error while applying rule DrillValuesRule,
args [rel#5149:LogicalValues.NONE.ANY([]).[[0]](type=RecordType(ANY ROW_VALUE),tuples=[{ 'a'
}, { 'b' }, { 'c' }, { null }])]
>         ... 4 common frames omitted
> Caused by: java.lang.AssertionError: Internal error: Error while applying rule DrillValuesRule,
args [rel#5149:LogicalValues.NONE.ANY([]).[[0]](type=RecordType(ANY ROW_VALUE),tuples=[{ 'a'
}, { 'b' }, { 'c' }, { null }])]
>         at org.apache.calcite.util.Util.newInternal(Util.java:790) ~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251)
~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:795)
~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:303) ~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         at org.apache.calcite.prepare.PlannerImpl.transform(PlannerImpl.java:316) ~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.logicalPlanningVolcanoAndLopt(DefaultSqlHandler.java:507)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:281)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:187)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:178)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:904) [drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:242) [drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         ... 3 common frames omitted
> Caused by: java.lang.UnsupportedOperationException: Unable to convert the value of null
and type ANY to a Drill constant expression.
>         at org.apache.drill.exec.planner.logical.DrillValuesRel.writeLiteral(DrillValuesRel.java:294)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillValuesRel.convertToJsonNode(DrillValuesRel.java:152)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillValuesRel.<init>(DrillValuesRel.java:77)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillValuesRule.onMatch(DrillValuesRule.java:40)
~[drill-java-exec-1.1.0-SNAPSHOT-rebuffed.jar:1.1.0-SNAPSHOT]
>         at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228)
~[calcite-core-1.1.0-drill-r7.jar:1.1.0-drill-r7]
>         ... 12 common frames omitted
> {code}



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

Mime
View raw message