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

TajoDump cannot dump upper/lower mixed case database names.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0, 0.9.0
    • Fix Version/s: 0.8.0, 0.9.0
    • Component/s: Java Client
    • Labels:
      None

      Description

      When users use upper/lower mixed case database names, TajoDump does not work correctly. This patch fixes this bug. In addition, this patch adds the unit test for TajoDump.

      Additionally, this patch fixes some trivial column resolving bug caused when a column name in target list is not fully qualified and another database different from the current database of the session is used in FROM clause.

      Example:

      SELECT "LineItem".L_ORDERKEY FROM "TestSelectQuery"."LineItem";
      
      1. TAJO-772.patch
        24 kB
        Hyunsik Choi

        Activity

        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/12640631/TAJO-772.patch
        against master revision 0a76c99.

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

        +1 tests included. The patch appears to include 14 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 196 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-catalog/tajo-catalog-common tajo-client tajo-core/tajo-core-backend.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/349//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/349//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/349//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/12640631/TAJO-772.patch against master revision 0a76c99. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 14 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 196 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-catalog/tajo-catalog-common tajo-client tajo-core/tajo-core-backend. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/349//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/349//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/349//console This message is automatically generated.
        Hide
        jhkim Jinho Kim added a comment -

        +1 for the patch.
        I've verified 'mvn clean install'.

        Show
        jhkim Jinho Kim added a comment - +1 for the patch. I've verified 'mvn clean install'.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #180 (See https://builds.apache.org/job/Tajo-master-build/180/)
        TAJO-772: TajoDump cannot dump upper/lower mixed case database names. (hyunsik: rev 508ebedfee19de0b057e166270d4acb74202079c)

        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef3.sql
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result
        • tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestDropTable.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/TableSubQueryNode.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestDropTable/drop_table_ddl.sql
        • tajo-core/tajo-core-backend/src/test/resources/results/TestNetTypes/testJoin.result
        • tajo-core/tajo-core-backend/src/test/resources/results/TestTajoDump/testDump1.result
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef2.sql
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/test/resources/org/apache/tajo/client/TestTajoDump.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ScanNode.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/CreateDatabaseNode.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/RelationNode.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/testJoin.sql
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef1.sql
        • tajo-core/tajo-core-backend/src/test/resources/results/TestSelectQuery/testDatabaseRef.result
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #180 (See https://builds.apache.org/job/Tajo-master-build/180/ ) TAJO-772 : TajoDump cannot dump upper/lower mixed case database names. (hyunsik: rev 508ebedfee19de0b057e166270d4acb74202079c) tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef3.sql tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestDropTable.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/TableSubQueryNode.java tajo-core/tajo-core-backend/src/test/resources/queries/TestDropTable/drop_table_ddl.sql tajo-core/tajo-core-backend/src/test/resources/results/TestNetTypes/testJoin.result tajo-core/tajo-core-backend/src/test/resources/results/TestTajoDump/testDump1.result tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef2.sql tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java CHANGES.txt tajo-core/tajo-core-backend/src/test/resources/org/apache/tajo/client/TestTajoDump.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ScanNode.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/CreateDatabaseNode.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/RelationNode.java tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/testJoin.sql tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef1.sql tajo-core/tajo-core-backend/src/test/resources/results/TestSelectQuery/testDatabaseRef.result
        Hide
        hyunsik Hyunsik Choi added a comment -

        I committed it to master. Also, I'm trying to commit it to branch-0.8.0, but git repo is not available now. After a while, I'll try to commit it.

        Thanks!

        Show
        hyunsik Hyunsik Choi added a comment - I committed it to master. Also, I'm trying to commit it to branch-0.8.0, but git repo is not available now. After a while, I'll try to commit it. Thanks!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #77 (See https://builds.apache.org/job/Tajo-0.8.0-build/77/)
        TAJO-772: TajoDump cannot dump upper/lower mixed case database names. (hyunsik: rev c89d8d6b16f9938b19a30b834d730a61de7ccd98)

        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/RelationNode.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestSelectQuery/testDatabaseRef.result
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/TableSubQueryNode.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestDropTable.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/testJoin.sql
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ScanNode.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestTajoDump/testDump1.result
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef3.sql
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/CreateDatabaseNode.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java
        • tajo-core/tajo-core-backend/src/test/resources/org/apache/tajo/client/TestTajoDump.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestNetTypes/testJoin.result
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef1.sql
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef2.sql
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestDropTable/drop_table_ddl.sql
        • tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #77 (See https://builds.apache.org/job/Tajo-0.8.0-build/77/ ) TAJO-772 : TajoDump cannot dump upper/lower mixed case database names. (hyunsik: rev c89d8d6b16f9938b19a30b834d730a61de7ccd98) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/RelationNode.java tajo-core/tajo-core-backend/src/test/resources/results/TestSelectQuery/testDatabaseRef.result tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/TableSubQueryNode.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestDropTable.java tajo-core/tajo-core-backend/src/test/resources/queries/TestNetTypes/testJoin.sql tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestSelectQuery.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ScanNode.java tajo-core/tajo-core-backend/src/test/resources/results/TestTajoDump/testDump1.result CHANGES.txt tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef3.sql tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/CreateDatabaseNode.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/QueryTestCaseBase.java tajo-core/tajo-core-backend/src/test/resources/org/apache/tajo/client/TestTajoDump.java tajo-core/tajo-core-backend/src/test/resources/results/TestNetTypes/testJoin.result tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef1.sql tajo-core/tajo-core-backend/src/test/resources/queries/TestSelectQuery/testDatabaseRef2.sql tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java tajo-core/tajo-core-backend/src/test/resources/queries/TestDropTable/drop_table_ddl.sql tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        Already committed. fixing it as resolved.

        Show
        hyunsik Hyunsik Choi added a comment - Already committed. fixing it as resolved.

          People

          • Assignee:
            hyunsik Hyunsik Choi
            Reporter:
            hyunsik Hyunsik Choi
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development