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

PreLogicalPlanVerifier::visitInsert need to find smaller expressions than target columns for a partitioned table.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Planner/Optimizer
    • Labels:
      None

      Description

      Currently, user can insert data even if there is small columns compare to target columns as follows:

      create table table1 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') ;
      
      create table table3 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') ;
      
      create table table4 (id int, name text, score float, type text) using csv with ('csvfile.delimiter'='|') partition by column(part text);
      
      default> insert overwrite into table3 select id, name from table1;
      Progress: 0%, response time: 0.544 sec
      Progress: 100%, response time: 1.158 sec
      (5 rows, 1.158 sec, 60 B inserted)
      
      default> insert overwrite into table4 select id, name from table1;
      Progress: 100%, response time: 0.468 sec
      (5 rows, 0.468 sec, 65 B inserted)
      

      As above, tajo can run a query for inserting data. But in partitioned table, tajo made null value for partition column as follows:

      hdfs dfs -ls /tajo/warehouse/default/table4
      Found 1 items
      drwxr-xr-x   - blrunner supergroup          0 2014-05-26 16:27 /tajo/warehouse/default/table4/part=
      

      Thus we need to make a syntax exception for blocking null partition value.

        Attachments

        1. TAJO-848_3.patch
          9 kB
          Jaehwa Jung
        2. TAJO-848_2.patch
          7 kB
          Jaehwa Jung
        3. TAJO-848.patch
          5 kB
          Jaehwa Jung

          Activity

            People

            • Assignee:
              blrunner Jaehwa Jung
              Reporter:
              blrunner Jaehwa Jung
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: