[
https://issues.apache.org/jira/browse/DRILL-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13759990#comment-13759990
]
Timothy Chen commented on DRILL-215:
------------------------------------
Sorry the query I put here is wrong, that's the one that works. The query Ted
used which is projecting REGION_KEY is the one that throws that error.
Can you try querying REGION_KEY and sorting on that?
> Exception running order by on nullable field
> --------------------------------------------
>
> Key: DRILL-215
> URL: https://issues.apache.org/jira/browse/DRILL-215
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Timothy Chen
>
> Running the following query in sqlline:
> select _MAP['N_NAME'] from "sample-data/nation.parquet" order by
> _MAP['N_NAME'] desc;
> Gives me this exception
> at org.apache.drill.exec.expr.TypeHelper.getNewVector(TypeHelper.java:504)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at
> org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:102)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at
> org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:36)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at org.apache.drill.exec.physical.impl.sort.SortBatch.next(SortBatch.java:86)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at
> org.apache.drill.exec.record.AbstractSingleRecordBatch.next(AbstractSingleRecordBatch.java:25)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at
> org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.next(ScreenCreator.java:77)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at org.apache.drill.exec.work.FragmentRunner.run(FragmentRunner.java:79)
> ~[java-exec-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> ~[na:1.7.0_25]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> ~[na:1.7.0_25]
> at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira