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.

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

        Activity

        Hide
        blrunner Jaehwa Jung added a comment -

        Created a review request against branch master in reviewboard
        https://reviews.apache.org/r/21906/

        Show
        blrunner Jaehwa Jung added a comment - Created a review request against branch master in reviewboard https://reviews.apache.org/r/21906/
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12646765/TAJO-848.patch
        against master revision 5bdfe88.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 192 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in tajo-core:
        org.apache.tajo.engine.eval.TestSQLExpression

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/432//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/432//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/432//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12646765/TAJO-848.patch against master revision 5bdfe88. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 192 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in tajo-core: org.apache.tajo.engine.eval.TestSQLExpression Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/432//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/432//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/432//console This message is automatically generated.
        Hide
        blrunner Jaehwa Jung added a comment -

        Updated the review request against branch master in reviewboard
        https://reviews.apache.org/r/21906/

        Show
        blrunner Jaehwa Jung added a comment - Updated the review request against branch master in reviewboard https://reviews.apache.org/r/21906/
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12646919/TAJO-848_2.patch
        against master revision 31e247c.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 5 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 193 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in tajo-core:
        org.apache.tajo.engine.eval.TestSQLExpression
        org.apache.tajo.engine.query.TestTablePartitions

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/439//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/439//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/439//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12646919/TAJO-848_2.patch against master revision 31e247c. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 193 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in tajo-core: org.apache.tajo.engine.eval.TestSQLExpression org.apache.tajo.engine.query.TestTablePartitions Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/439//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/439//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/439//console This message is automatically generated.
        Hide
        blrunner Jaehwa Jung added a comment -

        Updated the review request against branch master in reviewboard
        https://reviews.apache.org/r/21906/

        Show
        blrunner Jaehwa Jung added a comment - Updated the review request against branch master in reviewboard https://reviews.apache.org/r/21906/
        Hide
        tajoqa Tajo QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12649881/TAJO-848_3.patch
        against master revision f3092c4.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 5 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The applied patch does not increase the total number of javadoc warnings.

        +1 checkstyle. The patch generated 0 code style errors.

        -1 findbugs. The patch appears to introduce 189 new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/450//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/450//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/450//console

        This message is automatically generated.

        Show
        tajoqa Tajo QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12649881/TAJO-848_3.patch against master revision f3092c4. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 5 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The applied patch does not increase the total number of javadoc warnings. +1 checkstyle. The patch generated 0 code style errors. -1 findbugs. The patch appears to introduce 189 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed unit tests in tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/450//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/450//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/450//console This message is automatically generated.
        Hide
        blrunner Jaehwa Jung added a comment -

        This patch got +1 at RB.
        I've just committed it to master branch.

        Show
        blrunner Jaehwa Jung added a comment - This patch got +1 at RB. I've just committed it to master branch.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #251 (See https://builds.apache.org/job/Tajo-master-build/251/)
        TAJO-848: PreLogicalPlanVerifier::visitInsert need to find smaller expressions than target columns for a partitioned table. (jaehwa) (jhjung: rev 1613cd2c7917ffa8ecc8aee24729bd670f3b0ac8)

        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java
        • tajo-core/src/test/resources/queries/TestTablePartitions/case14.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
        • CHANGES
        • tajo-core/src/test/resources/results/TestTablePartitions/case14.result
        • tajo-core/src/test/resources/queries/TestTablePartitions/case15.sql
        • tajo-core/src/test/resources/results/TestTablePartitions/case15.result
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #251 (See https://builds.apache.org/job/Tajo-master-build/251/ ) TAJO-848 : PreLogicalPlanVerifier::visitInsert need to find smaller expressions than target columns for a partitioned table. (jaehwa) (jhjung: rev 1613cd2c7917ffa8ecc8aee24729bd670f3b0ac8) tajo-core/src/test/java/org/apache/tajo/engine/query/TestTablePartitions.java tajo-core/src/test/resources/queries/TestTablePartitions/case14.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java CHANGES tajo-core/src/test/resources/results/TestTablePartitions/case14.result tajo-core/src/test/resources/queries/TestTablePartitions/case15.sql tajo-core/src/test/resources/results/TestTablePartitions/case15.result

          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:

              Development