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

Fix some bugs after database is supported

    Details

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

      Description

      After TAJO-353 (database support), some bugs are also introduced to code.

      This patch fixes the bugs as follows:

      • \d "ABC" does not work.
      • tajo_dump cannot handle some identifiers to be double quoted.
      • the same table names in different databases are not allowed.

      In this patch, I fixed all bugs that I found, and added some unit tests to reproduce the cases.

      This is a critical issue. So, I'd like to ask the quick review.

      1. TAJO-712.patch
        24 kB
        Hyunsik Choi
      2. TAJO-712_3.patch
        28 kB
        Hyunsik Choi
      3. TAJO-712_2.patch
        26 kB
        Hyunsik Choi

        Activity

        Hide
        hyunsik Hyunsik Choi added a comment -

        Updated. This patch additionally includes more unit tests.

        Show
        hyunsik Hyunsik Choi added a comment - Updated. This patch additionally includes more unit tests.
        Hide
        jihoonson Jihoon Son added a comment -

        +1.
        The latest patch looks good to me.

        Show
        jihoonson Jihoon Son added a comment - +1. The latest patch looks good to me.
        Hide
        hyunsik Hyunsik Choi added a comment -

        I found that \c can cause ugly error messages when a database which is actually absent is chosen. This patch additionally fixes the message.

        Show
        hyunsik Hyunsik Choi added a comment - I found that \c can cause ugly error messages when a database which is actually absent is chosen. This patch additionally fixes the message.
        Hide
        hyunsik Hyunsik Choi added a comment - - edited

        The last one is very trivial. I'll commit it soon. Thanks for quick fix.

        Show
        hyunsik Hyunsik Choi added a comment - - edited The last one is very trivial. I'll commit it soon. Thanks for quick fix.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #136 (See https://builds.apache.org/job/Tajo-master-build/136/)
        TAJO-712: Fix some bugs after database is supported. (hyunsik) (hyunsik: rev a2a2c3ca97b058d96c127ae46527dff8fef73904)

        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/DerbyStore.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForExternalTable.result
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testJoinOnMultipleDatabases.sql
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestDDLBuilder.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
        • tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result
        • tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForBaseTable.result
        • tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/tables.sql
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestCTASQuery/CtasWithManagedTable.sql
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForBaseTable.result
        • tajo-core/tajo-core-backend/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java
        • tajo-client/src/main/java/org/apache/tajo/cli/ConnectDatabaseCommand.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result
        • tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForExternalTable.result
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java
        • tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/tables.sql
        • tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #136 (See https://builds.apache.org/job/Tajo-master-build/136/ ) TAJO-712 : Fix some bugs after database is supported. (hyunsik) (hyunsik: rev a2a2c3ca97b058d96c127ae46527dff8fef73904) tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/DerbyStore.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForExternalTable.result tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testJoinOnMultipleDatabases.sql tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestDDLBuilder.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForBaseTable.result tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/tables.sql tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java tajo-core/tajo-core-backend/src/test/resources/queries/TestCTASQuery/CtasWithManagedTable.sql tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForBaseTable.result tajo-core/tajo-core-backend/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java tajo-client/src/main/java/org/apache/tajo/cli/ConnectDatabaseCommand.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForExternalTable.result tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/tables.sql tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thank you for quick review. committed it to master and branch-0.8.0.

        Show
        hyunsik Hyunsik Choi added a comment - Thank you for quick review. committed it to master and branch-0.8.0.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #42 (See https://builds.apache.org/job/Tajo-0.8.0-build/42/)
        TAJO-712: Fix some bugs after database is supported. (hyunsik) (hyunsik: rev ad50593524b0160095c3697f9fc24fd2b6659a73)

        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForExternalTable.result
        • tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java
        • tajo-client/src/main/java/org/apache/tajo/cli/ConnectDatabaseCommand.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestCTASQuery/CtasWithManagedTable.sql
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java
        • tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForExternalTable.result
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result
        • tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/tables.sql
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
        • tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testJoinOnMultipleDatabases.sql
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/DerbyStore.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result
        • tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/tables.sql
        • tajo-core/tajo-core-backend/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
        • tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForBaseTable.result
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestDDLBuilder.java
        • tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForBaseTable.result
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #42 (See https://builds.apache.org/job/Tajo-0.8.0-build/42/ ) TAJO-712 : Fix some bugs after database is supported. (hyunsik) (hyunsik: rev ad50593524b0160095c3697f9fc24fd2b6659a73) tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForExternalTable.result tajo-common/src/main/java/org/apache/tajo/util/StringUtils.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCTASQuery.java tajo-client/src/main/java/org/apache/tajo/cli/ConnectDatabaseCommand.java tajo-core/tajo-core-backend/src/test/resources/queries/TestCTASQuery/CtasWithManagedTable.sql tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/DDLBuilder.java tajo-client/src/main/java/org/apache/tajo/client/TajoDump.java tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForExternalTable.result tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName2.result tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/tables.sql tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testJoinOnMultipleDatabases.sql tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/DerbyStore.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLQuotedTableName1.result tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/tables.sql tajo-core/tajo-core-backend/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4 tajo-core/tajo-core-backend/src/test/resources/results/testBuildDDLForBaseTable.result tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/client/TestDDLBuilder.java tajo-core/tajo-core-backend/src/test/resources/results/testDDLBuilder/testBuildDDLForBaseTable.result

          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