You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2014/08/08 23:51:11 UTC

[jira] [Created] (DRILL-1278) Selecting individual fields from a map with a join fails with IllegalStateException

Mehant Baid created DRILL-1278:
----------------------------------

             Summary: Selecting individual fields from a map with a join fails with IllegalStateException 
                 Key: DRILL-1278
                 URL: https://issues.apache.org/jira/browse/DRILL-1278
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Mehant Baid
            Assignee: Mehant Baid


I have the following json file
bug.json
{"col" : {"name" : "foo", "id": 1}, "col1": 1}
{"col" : {"name" : "bar", "id": 2}, "col1": 2}

Have the same data in another file bug1.json.

The following query succeeds and returns the right result.
select b.col from dfs.`bug.json` b, dfs.`bug1.json` b1 where b.col1 = b1.col1;

However selecting an individual field from the 'col' map fails.
select b.col.name from dfs.`bug.json` b, dfs.`bug1.json` b1 where b.col1 = b1.col1;

Below is the stack trace

java.lang.IllegalStateException

Incoming batch has an empty schema. This is not allowed.

at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:128) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:75) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:65) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:45) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:120) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:95) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:116) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:59) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:98) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:49) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:105) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:250) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]

at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]




--
This message was sent by Atlassian JIRA
(v6.2#6252)