drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhishek Girish (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-1969) Error message thrown while querying Hive Views from Drill must be improved
Date Fri, 09 Jan 2015 01:44:34 GMT
Abhishek Girish created DRILL-1969:
--------------------------------------

             Summary: Error message thrown while querying Hive Views from Drill must be improved
                 Key: DRILL-1969
                 URL: https://issues.apache.org/jira/browse/DRILL-1969
             Project: Apache Drill
          Issue Type: Improvement
          Components: Storage - Hive
            Reporter: Abhishek Girish
            Assignee: Venki Korukanti


Currently querying Hive views is not supported via Drill. This may however not be clear to
an end user as both hive tables and hive views can be listed via Drill.

> use hive;
+------------+------------+
|     ok     |  summary   |
+------------+------------+
| true       | Default schema changed to 'hive' |
+------------+------------+

> show tables;
+--------------+------------+
| TABLE_SCHEMA | TABLE_NAME |
+--------------+------------+
| hive.default | tab1_view  |
| hive.default | tab1       |
+--------------+------------+

Querying a hive table is successful. However querying a hive view fails with an error which
isn't informative. 

> select * from tab1;
+------------+------------+
|     a1     |     a2     |
+------------+------------+
| 1          | ABC        |
+------------+------------+

> select * from tab1_view;
Query failed: Query failed: Unexpected exception during fragment initialization: Internal
error: Error while applying rule DrillPushProjIntoScan, args [rel#5828:ProjectRel.NONE.ANY([]).[](child=rel#5827:Subset#0.ENUMERABLE.ANY([]).[],a1=$0,a2=$1),
rel#5822:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[hive, tab1_view])]

Error: exception while executing query: Failure while executing query. (state=,code=0)

The error message thrown at the console must be improved such as to indicate that at present
querying Hive Views is not supported. 

LOG:
2015-01-08 17:38:41,009 [2b50cede-b757-f6c3-6c5f-56f524796772:foreman] ERROR o.a.drill.exec.work.foreman.Foreman
- Error 3efe02b8-19cd-4e42-a89c-190488762993: Query failed: Unexpected exception during fragment
initialization: Internal error: Error while applying rule DrillPushProjIntoScan, args [rel#5828:ProjectRel.NONE.ANY([]).[](child=rel#5827:Subset#0.ENUMERABLE.ANY([]).[],a1=$0,a2=$1),
rel#5822:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[hive, tab1_view])]
org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment
initialization: Internal error: Error while applying rule DrillPushProjIntoScan, args [rel#5828:ProjectRel.NONE.ANY([]).[](child=rel#5827:Subset#0.ENUMERABLE.ANY([]).[],a1=$0,a2=$1),
rel#5822:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[hive, tab1_view])]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:194) [drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_65]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_65]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
Caused by: java.lang.AssertionError: Internal error: Error while applying rule DrillPushProjIntoScan,
args [rel#5828:ProjectRel.NONE.ANY([]).[](child=rel#5827:Subset#0.ENUMERABLE.ANY([]).[],a1=$0,a2=$1),
rel#5822:EnumerableTableAccessRel.ENUMERABLE.ANY([]).[](table=[hive, tab1_view])]
        at org.eigenbase.util.Util.newInternal(Util.java:750) ~[optiq-core-0.9-drill-r12.jar:na]
        at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:246)
~[optiq-core-0.9-drill-r12.jar:na]
        at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:661)
~[optiq-core-0.9-drill-r12.jar:na]
        at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165) ~[optiq-core-0.9-drill-r12.jar:na]
        at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:276) ~[optiq-core-0.9-drill-r12.jar:na]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:155)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:134)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:145)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:507) [drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:185) [drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        ... 4 common frames omitted
Caused by: java.lang.UnsupportedOperationException: Querying Hive views from Drill is not
supported in current version.
        at org.apache.drill.exec.store.hive.HiveStoragePlugin.getPhysicalScan(HiveStoragePlugin.java:74)
~[drill-storage-hive-core-0.7.0-r2-SNAPSHOT.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.store.hive.HiveStoragePlugin.getPhysicalScan(HiveStoragePlugin.java:41)
~[drill-storage-hive-core-0.7.0-r2-SNAPSHOT.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.store.AbstractStoragePlugin.getPhysicalScan(AbstractStoragePlugin.java:53)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.planner.logical.DrillTable.getGroupScan(DrillTable.java:53)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.apache.drill.exec.planner.logical.DrillPushProjIntoScan.onMatch(DrillPushProjIntoScan.java:56)
~[drill-java-exec-0.7.0-r2-SNAPSHOT-rebuffed.jar:0.7.0-r2-SNAPSHOT]
        at org.eigenbase.relopt.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223)
~[optiq-core-0.9-drill-r12.jar:na]
        ... 12 common frames omitted



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

Mime
View raw message