drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2516) CTAS fails with NPE when select statement contains join and columns are not specified explicitly
Date Fri, 20 Mar 2015 23:51:38 GMT
Victoria Markman created DRILL-2516:
---------------------------------------

             Summary: CTAS fails with NPE when select statement contains join and columns
are not specified explicitly
                 Key: DRILL-2516
                 URL: https://issues.apache.org/jira/browse/DRILL-2516
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - Writer
    Affects Versions: 0.8.0
            Reporter: Victoria Markman
            Assignee: Steven Phillips


{code}
0: jdbc:drill:schema=dfs> select * from t1, t2 where t1.a1 = t2.a2;
+------------+------------+------------+------------+------------+------------+
|     a1     |     b1     |     c1     |     a2     |     b2     |     c2     |
+------------+------------+------------+------------+------------+------------+
| 1          | aaaaa      | 2015-01-01 | 1          | aaaaa      | 2015-01-01 |
| 2          | bbbbb      | 2015-01-02 | 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 | 2          | bbbbb      | 2015-01-02 |
| 2          | bbbbb      | 2015-01-02 | 2          | bbbbb      | 2015-01-02 |
| 3          | ccccc      | 2015-01-03 | 3          | ccccc      | 2015-01-03 |
| 4          | null       | 2015-01-04 | 4          | ddddd      | 2015-01-04 |
| 5          | eeeee      | 2015-01-05 | 5          | eeeee      | 2015-01-05 |
| 6          | fffff      | 2015-01-06 | 6          | fffff      | 2015-01-06 |
| 7          | ggggg      | 2015-01-07 | 7          | ggggg      | 2015-01-07 |
| 7          | ggggg      | 2015-01-07 | 7          | ggggg      | 2015-01-07 |
| 9          | iiiii      | null       | 9          | iiiii      | 2015-01-09 |
+------------+------------+------------+------------+------------+------------+
11 rows selected (0.253 seconds)
{code}

CTAS assert:
{code}
0: jdbc:drill:schema=dfs> create table test as select * from t1, t2 where t1.a1 = t2.a2;
Query failed: RemoteRpcException: Failure while running fragment.[ 83a1a356-b427-4dce-822f-6ae35ef9ca38
on atsqa4-134.qa.lab:31010 ]
[ 83a1a356-b427-4dce-822f-6ae35ef9ca38 on atsqa4-134.qa.lab:31010 ]
Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

>From drillbit.log
{code}
2015-03-20 23:40:30,017 [2af35011-91c9-7834-14b3-863cb0cf41d2:frag:0:0] ERROR o.a.d.e.w.f.AbstractStatusReporter
- Error 83a1a356-b427-4dce-822f-6ae35ef9ca38: Failure while running fragment.
java.lang.AssertionError: null
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:347)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:78)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.WriterRecordBatch.innerNext(WriterRecordBatch.java:102)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:68) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:96)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:58) ~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:145)
~[drill-java-exec-0.8.0-SNAPSHOT-rebuffed.jar:0.8.0-SNAPSHOT]
        at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
[drill-common-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]
2015-03-20 23:40:30,018 [2af35011-91c9-7834-14b3-863cb0cf41d2:frag:0:0] INFO  o.a.drill.exec.work.foreman.Foreman
- State change requested.  RUNNING --> FAILED
org.apache.drill.exec.rpc.RemoteRpcException: Failure while running fragment.[ 83a1a356-b427-4dce-822f-6ae35ef9ca38
on atsqa4-134.qa.lab:31010 ]
{code}

Works if columns are explicitly specified:
{code}
0: jdbc:drill:schema=dfs> create table test as select t1.a1, t1.b1, t1.c1, t2.a2, t2.b2,
t2.c2 from t1, t2 where t1.a1 = t2.a2;
+------------+---------------------------+
|  Fragment  | Number of records written |
+------------+---------------------------+
| 0_0        | 11                        |
+------------+---------------------------+
1 row selected (0.336 seconds)
{code}




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

Mime
View raw message