drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2386) Exception on describe view
Date Wed, 04 Mar 2015 23:11:38 GMT

    [ https://issues.apache.org/jira/browse/DRILL-2386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14347748#comment-14347748
] 

Victoria Markman commented on DRILL-2386:
-----------------------------------------

OMG ! You are correct !!! It only happens if I use "view" . Is it not reserved word ? 
This bug falls into category of "not so great bugs" :)

> Exception on describe view 
> ---------------------------
>
>                 Key: DRILL-2386
>                 URL: https://issues.apache.org/jira/browse/DRILL-2386
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>            Reporter: Victoria Markman
>            Assignee: Jinfeng Ni
>
> I'm sure that this bug has nothing to do with the "WITH clause", it happened two days
ago with completely different query and I could not reproduce it again (see case #2)
> Here is the case #1
> {code}
> 0: jdbc:drill:schema=dfs> create view vvv as with x(x1, x2) as (select a1, count(*)
from `t1.json` group by a1) select x1, x2 from x;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'vvv' created successfully in 'dfs.test' schema |
> +------------+------------+
> 1 row selected (0.077 seconds)
> 0: jdbc:drill:schema=dfs> select * from vvv;
> +------------+------------+
> |     x1     |     x2     |
> +------------+------------+
> | 1          | 1          |
> | 2          | 3          |
> | 3          | 1          |
> | 4          | 1          |
> | 5          | 3          |
> | 6          | 1          |
> | 7          | 1          |
> | 8          | 1          |
> | 9          | 1          |
> | null       | 1          |
> +------------+------------+
> 10 rows selected (0.09 seconds)
> 0: jdbc:drill:schema=dfs> describe view vvv;
> Query failed: RelConversionException: Table view is not valid
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> I wanted to see if I can reproduce it, on a second attempt it worked:
> {code}
> 0: jdbc:drill:schema=dfs> create view v2 as with x(x1, x2) as (select a1, count(*)
from `t1.json` group by a1) select x1, x2 from x;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'v2' created successfully in 'dfs.test' schema |
> +------------+------------+
> 1 row selected (0.058 seconds)
> 0: jdbc:drill:schema=dfs> select * from v2;
> +------------+------------+
> |     x1     |     x2     |
> +------------+------------+
> | 1          | 1          |
> | 2          | 3          |
> | 3          | 1          |
> | 4          | 1          |
> | 5          | 3          |
> | 6          | 1          |
> | 7          | 1          |
> | 8          | 1          |
> | 9          | 1          |
> | null       | 1          |
> +------------+------------+
> 10 rows selected (0.103 seconds)
> 0: jdbc:drill:schema=dfs> describe v2;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
> +-------------+------------+-------------+
> | x1          | ANY        | NO          |
> | x2          | BIGINT     | NO          |
> +-------------+------------+-------------+
> 2 rows selected (0.067 seconds)
> {code}
> From drillbit.log
> {code}
> 2015-03-04 22:35:16,271 [2b08775b-6e46-055a-825f-00b4c54d5fe6:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- State change requested.  PENDING --> FAILED
> org.apache.drill.exec.planner.sql.QueryInputException: Failure handling SQL.
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:149)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:515) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:188) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303)
[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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: net.hydromatic.optiq.tools.RelConversionException: Error while rewriting DESCRIBE
query: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:106)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:129)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 6 common frames omitted
> Caused by: net.hydromatic.optiq.tools.RelConversionException: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:70)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 8 common frames omitted
> 2015-03-04 22:35:16,323 [2b08775b-6e46-055a-825f-00b4c54d5fe6:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 0e75700c-78ec-4c63-a9e2-6ad6461e7f3a: RelConversionException: Table view is not valid
> org.apache.drill.exec.planner.sql.QueryInputException: Failure handling SQL.
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:149)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:515) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:188) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303)
[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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: net.hydromatic.optiq.tools.RelConversionException: Error while rewriting DESCRIBE
query: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:106)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:129)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 6 common frames omitted
> Caused by: net.hydromatic.optiq.tools.RelConversionException: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:70)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 8 common frames omitted
> 2015-03-04 22:35:16,323 [2b08775b-6e46-055a-825f-00b4c54d5fe6:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- foreman cleaning up - status: []
> {code}
> Case #2 (totally different query)
> {code}
> 0: jdbc:drill:schema=dfs> create view v1 as select sum(case when d28 = 0 then 100
else round(d28/12) end) from alltypes_with_nulls;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'v1' created successfully in 'dfs.aggregation' schema |
> +------------+------------+
> 1 row selected (0.052 seconds)
> 0: jdbc:drill:schema=dfs> describe view v1;
> Query failed: RelConversionException: Table view is not valid
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 2015-03-01 23:48:20,015 [2b0c5abc-78e8-032d-0b28-f6665995274d:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- State change requested.  PENDING --> FAILED
> org.apache.drill.exec.planner.sql.QueryInputException: Failure handling SQL.
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:149)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:515) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:188) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303)
[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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: net.hydromatic.optiq.tools.RelConversionException: Error while rewriting DESCRIBE
query: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:106)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:129)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 6 common frames omitted
> Caused by: net.hydromatic.optiq.tools.RelConversionException: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:70)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 8 common frames omitted
> 2015-03-01 23:48:20,029 [2b0c5abc-78e8-032d-0b28-f6665995274d:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 2f9169bf-87bf-4f3c-b48e-751896a7a94a: RelConversionException: Table view is not valid
> org.apache.drill.exec.planner.sql.QueryInputException: Failure handling SQL.
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:149)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:515) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:188) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:303)
[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.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: net.hydromatic.optiq.tools.RelConversionException: Error while rewriting DESCRIBE
query: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:106)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:129)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 6 common frames omitted
> Caused by: net.hydromatic.optiq.tools.RelConversionException: Table view is not valid
>         at org.apache.drill.exec.planner.sql.handlers.DescribeTableHandler.rewrite(DescribeTableHandler.java:70)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 8 common frames omitted
> 2015-03-01 23:48:20,030 [2b0c5abc-78e8-032d-0b28-f6665995274d:foreman] INFO  o.a.drill.exec.work.foreman.Foreman
- foreman cleaning up - status: []
> {code}



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

Mime
View raw message