drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2990) Use of limit and offset together results in calcite.tools.ValidationException: java.lang.UnsupportedOperationException
Date Fri, 08 May 2015 01:38:00 GMT
Khurram Faraaz created DRILL-2990:
-------------------------------------

             Summary: Use of limit and offset together results in calcite.tools.ValidationException:
java.lang.UnsupportedOperationException
                 Key: DRILL-2990
                 URL: https://issues.apache.org/jira/browse/DRILL-2990
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.0.0
         Environment: b856d0dd50a4495f95ee5d32ea3d396df56842ed
            Reporter: Khurram Faraaz
            Assignee: Jinfeng Ni


Use of limit and offset leads to 
calcite.tools.ValidationException: UnsupportedOperationException
Tested on 4 node cluster on CentOS.
 
{code}
0: jdbc:drill:> (select * from `airports.csv` offset 1) limit 10;
Error: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: 4e5f8f9d-6115-4b73-a872-4c3c06d2ba00 on centos-01.qa.lab:31010] (state=,code=0)
{code}

{code}0: jdbc:drill:> (select * from `airports.csv` limit 10) offset 1;
Error: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: 841d55f0-4131-488a-a1cf-c8575e2a2c21 on centos-01.qa.lab:31010] (state=,code=0)
{code}

case where there are two set of parenthesis 

{code}
0: jdbc:drill:> ((select * from `airports.csv` offset 1) limit 10);
Error: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: 5bbb1dd1-54c4-44bd-982c-6c63974da7c4 on centos-01.qa.lab:31010] (state=,code=0)
{code}

{code}
0: jdbc:drill:> ((select * from `airports.csv` limit 10) offset 1);
Error: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: 55acf905-f26d-46bc-bf93-b3048ef0fccd on centos-01.qa.lab:31010] (state=,code=0)
{code}

Total number of records in airports.cv

{code}
0: jdbc:drill:> select count(*) from `airports.csv`;
+------------+
|   EXPR$0   |
+------------+
| 46315      |
+------------+
1 row selected (0.294 seconds)
{code}

Stack trace from drillbit.log

{code}
org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: d3bd80ce-786c-488a-94e9-97073c3edcbb ]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:212) [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_75]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_75]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: org.apache.drill.common.exceptions.UserException: PARSE ERROR: java.lang.UnsupportedOperationException


[Error Id: d3bd80ce-786c-488a-94e9-97073c3edcbb ]
        at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:465)
~[drill-common-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:170)
~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:788) [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:203) [drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        ... 3 common frames omitted
Caused by: org.apache.calcite.tools.ValidationException: java.lang.UnsupportedOperationException
        at org.apache.calcite.prepare.PlannerImpl.validate(PlannerImpl.java:176) ~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.calcite.prepare.PlannerImpl.validateAndGetType(PlannerImpl.java:185)
~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode(DefaultSqlHandler.java:191)
~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:143)
~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:167)
~[drill-java-exec-1.0.0-SNAPSHOT-rebuffed.jar:1.0.0-SNAPSHOT]
        ... 5 common frames omitted
Caused by: java.lang.UnsupportedOperationException: null
        at org.apache.calcite.sql.SqlCall.setOperand(SqlCall.java:63) ~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.performUnconditionalRewrites(SqlValidatorImpl.java:1004)
~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:829)
~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:552)
~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        at org.apache.calcite.prepare.PlannerImpl.validate(PlannerImpl.java:174) ~[calcite-core-1.1.0-drill-r3.jar:1.1.0-drill-r3]
        ... 9 common frames omitted
{code}



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

Mime
View raw message