drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2481) Querying individual column from view results in AssertionError
Date Fri, 03 Apr 2015 21:42:54 GMT

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

Sean Hsuan-Yi Chu commented on DRILL-2481:
------------------------------------------

I tried the same query on the master and got :
UnsupportedRelOperatorException: Union-All over schema-less tables must specify the columns
explicitly

This is what we expected because CSV is considered as schema-less. 

Can you try if you would also see this on the latest version? 

> Querying individual column from view results in AssertionError
> --------------------------------------------------------------
>
>                 Key: DRILL-2481
>                 URL: https://issues.apache.org/jira/browse/DRILL-2481
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>    Affects Versions: 0.8.0
>            Reporter: Khurram Faraaz
>            Assignee: Sean Hsuan-Yi Chu
>             Fix For: 0.9.0
>
>
> Querying an individual column from a view results in an AssertionError
> Data used was from a csv file, its content was a single row (pls see below)
> 1,John Doe,HR,5000,Software Engineer 
> {code}
> 0: jdbc:drill:> use dfs.tmp;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | Default schema changed to 'dfs.tmp' |
> +------------+------------+
> 1 row selected (0.188 seconds)
> 0: jdbc:drill:> create view v1 as select * from `employee.csv` union all select *
from `employee.csv`;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'v1' created successfully in 'dfs.tmp' schema |
> +------------+------------+
> 1 row selected (0.073 seconds)
> 0: jdbc:drill:> create view v2 as select * from `employee.csv` union all select *
from `employee.csv`;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | View 'v2' created successfully in 'dfs.tmp' schema |
> +------------+------------+
> 1 row selected (0.046 seconds)
> 0: jdbc:drill:> select * from v1;
> +------------+
> |  columns   |
> +------------+
> | ["1","John Doe","HR","5000","Software Engineer"] |
> | ["1","John Doe","HR","5000","Software Engineer"] |
> +------------+
> 2 rows selected (0.087 seconds)
> 0: jdbc:drill:> select * from v2;
> +------------+
> |  columns   |
> +------------+
> | ["1","John Doe","HR","5000","Software Engineer"] |
> | ["1","John Doe","HR","5000","Software Engineer"] |
> +------------+
> 2 rows selected (0.075 seconds)
> 0: jdbc:drill:> describe v1;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
> +-------------+------------+-------------+
> | *           | ANY        | NO          |
> +-------------+------------+-------------+
> 1 row selected (0.084 seconds)
> 0: jdbc:drill:> describe v2;
> +-------------+------------+-------------+
> | COLUMN_NAME | DATA_TYPE  | IS_NULLABLE |
> +-------------+------------+-------------+
> | *           | ANY        | NO          |
> +-------------+------------+-------------+
> 1 row selected (0.083 seconds)
> 0: jdbc:drill:> select columns[0] from v1;
> Query failed: AssertionError: ANY
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> {code}
> Stack trace from drillbit.log
> 2015-03-17 16:40:43,176 [2af7a6f3-bbcf-3a34-dfae-5b5bb11ff4a9:foreman] INFO  o.a.d.e.s.schedule.BlockMapBuilder
- Get block maps: Executed 1 out of 1 using 1 threads. Time: 1ms total, 1.060851ms avg, 1ms
max.
> 2015-03-17 16:40:43,178 [2af7a6f3-bbcf-3a34-dfae-5b5bb11ff4a9: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: ANY
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:195) [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_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: java.lang.AssertionError: ANY
>         at org.eigenbase.reltype.RelDataTypeImpl.getFieldCount(RelDataTypeImpl.java:114)
~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.relopt.RelOptUtil$2.size(RelOptUtil.java:143) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitInputRef(RexChecker.java:111) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitInputRef(RexChecker.java:55) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexInputRef.accept(RexInputRef.java:103) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitCall(RexChecker.java:136) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitCall(RexChecker.java:55) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexCall.accept(RexCall.java:106) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitCall(RexChecker.java:136) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexChecker.visitCall(RexChecker.java:55) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rex.RexCall.accept(RexCall.java:106) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rel.ProjectRelBase.isValid(ProjectRelBase.java:156) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.rel.ProjectRelBase.<init>(ProjectRelBase.java:82) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.apache.drill.exec.planner.common.DrillProjectRelBase.<init>(DrillProjectRelBase.java:54)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillProjectRel.<init>(DrillProjectRel.java:47)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillProjectRel.copy(DrillProjectRel.java:53)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.eigenbase.rel.ProjectRelBase.copy(ProjectRelBase.java:99) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.relopt.volcano.RelSubset$CheapestPlanReplacer.visit(RelSubset.java:472)
~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.relopt.volcano.RelSubset.buildCheapestPlan(RelSubset.java:287)
~[optiq-core-0.9-drill-r20.jar:na]
>         at org.eigenbase.relopt.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:677)
~[optiq-core-0.9-drill-r20.jar:na]
>         at net.hydromatic.optiq.tools.Programs$RuleSetProgram.run(Programs.java:165)
~[optiq-core-0.9-drill-r20.jar:na]
>         at net.hydromatic.optiq.prepare.PlannerImpl.transform(PlannerImpl.java:275) ~[optiq-core-0.9-drill-r20.jar:na]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:206)
~[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:138)
~[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]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:509) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:186) [drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
>         ... 4 common frames omitted
> {code}
> {code}
> 0: jdbc:drill:> select * from sys.version;
> +------------+----------------+-------------+-------------+------------+
> | commit_id  | commit_message | commit_time | build_email | build_time |
> +------------+----------------+-------------+-------------+------------+
> | f658a3c513ddf7f2d1b0ad7aa1f3f65049a594fe | DRILL-2209 Insert ProjectOperator with MuxExchange
| 09.03.2015 @ 01:49:18 EDT | Unknown     | 09.03.2015 @ 04:50:05 EDT |
> +------------+----------------+-------------+-------------+------------+
> 1 row selected (0.044 seconds)
> {code}



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

Mime
View raw message