[ https://issues.apache.org/jira/browse/DRILL-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16226669#comment-16226669 ]
ASF GitHub Bot commented on DRILL-847: -------------------------------------- GitHub user vdiravka opened a pull request: https://github.com/apache/drill/pull/1017 The query with "SELECT *" with "ORDER BY" clause and `planner.slice_t… …arget`=1 doesn't preserve column order Issue: Columns ordering doesn't preserve for the star query with sorting when this is planned into multiple fragments. Solution: The commit for DRILL-847 is oudated. There is no need to canonicalize the batch or container since RecordBatchLoader swallows the "schema change" for now if two batches have different column ordering. You can merge this pull request into a Git repository by running: $ git pull https://github.com/vdiravka/drill DRILL-5822 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/1017.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1017 ---- commit 922505c35ed18f5cf76a5ded77a734827c15eb59 Author: Vitalii Diravka <vitalii.dira...@gmail.com> Date: 2017-10-26T18:07:33Z The query with "SELECT *" with "ORDER BY" clause and `planner.slice_target`=1 doesn't preserve column order - The commit for DRILL-847 is oudated. There is no need to canonicalize the batch or container since RecordBatchLoader swallows the "schema change" for now if two batches have different column ordering. ---- > Merging Receiver requires to canonicalize schemas of input batches > ------------------------------------------------------------------- > > Key: DRILL-847 > URL: https://issues.apache.org/jira/browse/DRILL-847 > Project: Apache Drill > Issue Type: Bug > Reporter: Jinfeng Ni > Assignee: Jinfeng Ni > Fix For: 0.4.0 > > Attachments: DRILL-847.1.patch > > > The Merge Receivers assumes all the incoming batches have the same schemas. > If the incoming batches happen to have different schemas, the run-time > generated code for merge receiver would not be able to handle the different > schemas, and could throw ClassCast Exception. > To fix it, we need canonicalize the schemas of incoming batches for merge > receiver. If the schemas are still different after this step, Merge Receiver > would throw exception. -- This message was sent by Atlassian JIRA (v6.4.14#64029)