You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/02/20 23:20:12 UTC

[jira] [Commented] (DRILL-1847) Union All does not match corresponding columns by index to union columns

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

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

This issue is included in DRILL-2207. But short answers below: 
1. Under union, there will be additional project operator to canonicalize the column order (same as that below screen)

2. Renaming project will not be used since we can delay re-naming till execution time when we are trying to building schema for the output from UNION.

> Union All does not match corresponding columns by index to union columns
> ------------------------------------------------------------------------
>
>                 Key: DRILL-1847
>                 URL: https://issues.apache.org/jira/browse/DRILL-1847
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>            Reporter: Jason Altekruse
>            Assignee: Sean Hsuan-Yi Chu
>            Priority: Critical
>             Fix For: 0.8.0
>
>
> Union all currently relies on columns to be named the same to merge them, this does not follow the behavior of traditional databases. This is a bit complicated with Drill, as we do not always know type information up front, so validating these queries will have to be less strict. We need to either fix this at planning to insert renaming based on the column orderings in the query or by changing the behavior of the operator to use the column orders that come in. This does not seem to be the best behavior as the engine canonicalizes the column order in some cases, so the order is not always preserved in the middle of processing, it is reordered at the end to provide the correct order to users.



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