Details

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

      Description

      This patch fixes two cases of expression projection bugs. Please take a look at two example cases:

      The point of this case is outer join and constant expression.

      select c_custkey, o.o_orderkey, 'val' as val from customer left outer join (select * from orders) o on c_custkey = o.o_orderkey
      

      The point of this case is non-column grouping keys.

      select upper(lower(l_orderkey::text)) as key, count(1) as total from lineitem group by upper(lower(l_orderkey::text)) order by upper(lower(l_orderkey::text)), total;
      
      1. TAJO-567.patch
        18 kB
        Hyunsik Choi

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #42 (See https://builds.apache.org/job/Tajo-master-build/42/)
        TAJO-567: Expression projection bugs. (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=179a707fc4ba58425ebd92ccd5d64c6cba78d512)

        • tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
        • tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql
        • tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result
        • tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result
        • tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result
        • tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #42 (See https://builds.apache.org/job/Tajo-master-build/42/ ) TAJO-567 : Expression projection bugs. (hyunsik: https://git-wip-us.apache.org/repos/asf?p=incubator-tajo.git&a=commit&h=179a707fc4ba58425ebd92ccd5d64c6cba78d512 ) tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.sql tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys1.sql tajo-algebra/src/main/java/org/apache/tajo/algebra/FunctionExpr.java tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java tajo-core/tajo-core-backend/src/test/resources/queries/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.sql CHANGES.txt tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestJoinQuery.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/NamedExprsManager.java tajo-algebra/src/main/java/org/apache/tajo/algebra/Insert.java tajo-algebra/src/main/java/org/apache/tajo/algebra/TablePrimarySubQuery.java tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithConstantKeys1.sql tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-algebra/src/main/java/org/apache/tajo/algebra/Projection.java tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr2.result tajo-core/tajo-core-backend/src/test/resources/queries/TestGroupByQuery/testGroupByWithExpressionKeys2.sql tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/FunctionDesc.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/rewrite/ProjectionPushDownRule.java tajo-algebra/src/main/java/org/apache/tajo/algebra/Join.java tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys2.result tajo-core/tajo-core-backend/src/test/resources/results/TestJoinQuery/testLeftOuterJoinWithConstantExpr1.result tajo-core/tajo-core-backend/src/test/resources/results/TestGroupByQuery/testGroupByWithExpressionKeys1.result tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        Thanks for the quick review. committed.

        Show
        hyunsik Hyunsik Choi added a comment - Thanks for the quick review. committed.
        Hide
        blrunner Jaehwa Jung added a comment -

        +1. Ship it.

        Show
        blrunner Jaehwa Jung added a comment - +1. Ship it.
        Hide
        hyunsik Hyunsik Choi added a comment -

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

        Show
        hyunsik Hyunsik Choi added a comment - Created a review request against branch master in reviewboard https://reviews.apache.org/r/17482/

          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