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

ASF GitHub Bot commented on TAJO-1556:
--------------------------------------

GitHub user superpiggy opened a pull request:

    https://github.com/apache/tajo/pull/546

    TAJO-1556: "insert into select" with reordered column list does not work.

    fixed a bug in buildProjectedInsert.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/superpiggy/tajo TAJO-1556

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tajo/pull/546.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 #546
    
----
commit 2a69ecd89fa336e6bf1408f1214a820d5090ce65
Author: Yongjin Choi <[email protected]>
Date:   2015-04-20T00:06:44Z

    TAJO-1556: fix a bug in buildProjectedInsert

----


> "insert into select" with reordered column list does not work.
> --------------------------------------------------------------
>
>                 Key: TAJO-1556
>                 URL: https://issues.apache.org/jira/browse/TAJO-1556
>             Project: Tajo
>          Issue Type: Bug
>          Components: compilation
>            Reporter: Yongjin Choi
>            Assignee: Yongjin Choi
>            Priority: Minor
>
> Using "insert into table1 (colums, ...) select " statement, users can fill 
> part of table and tajo already had this feature.
> If columns are given in the same order as table definition, it seems to work 
> well.
> Otherwise, the results are reversed.
> This bug can be reproduced easily as shown below (table1 is same as in 
> http://tajo.apache.org/docs/0.8.0/getting_started/first_query.html).
> {code:sql}
> create table t1 (id int, name text, score float, type text);
> insert into t1 (type, name) select type, name from table1;
> default> select * from t1;
> id,  name,  score,  type
> -------------------------------
> ,  a,  ,  abc
> ,  b,  ,  def
> {code}
> But, the expected result is as follows.
> {code:sql}
> default> select * from t1;
> id,  name,  score,  type
> -------------------------------
> ,  abc,  ,  a
> ,  def,  ,  b
> {code}



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

Reply via email to