Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1556

"insert into select" with reordered column list does not work.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11.0, 0.10.1
    • Component/s: Compilation
    • Labels:
      None

      Description

      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).

      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
      

      But, the expected result is as follows.

      default> select * from t1;
      id,  name,  score,  type
      -------------------------------
      ,  abc,  ,  a
      ,  def,  ,  b
      

        Attachments

        1. TAJO-1556.patch
          5 kB
          Yongjin Choi
        2. TAJO-1556_add_test.patch
          10 kB
          Jihoon Son

          Activity

            People

            • Assignee:
              yongjin.choi Yongjin Choi
              Reporter:
              yongjin.choi Yongjin Choi
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: