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

Multiple distinct should be supported.

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.9.0, 0.8.1
    • Component/s: None
    • Labels:
      None

      Description

      Currently the following query is not supported.

      default> select id, count(distinct age), count(distinct name) from table2 group by id;
      ERROR: different DISTINCT columns are not supported yet: age, name
      
      1. TAJO-801.patch
        96 kB
        Hyoungjun Kim

        Activity

        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.1-build #99 (See https://builds.apache.org/job/Tajo-0.8.1-build/99/)
        TAJO-801: Multiple distinct should be supported. (Hyoungjun Kim via hyunsik) (hyunsik: rev 081fea3974ea927a1a40b952f67814be67d2c5ba)

        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case3.sql
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case7.sql
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case1.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/DistinctGroupbyNode.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case6.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExplainLogicalPlanVisitor.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation7.sql
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case5.result
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/HashAggregateExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/ExternalSortExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/NodeType.java
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case7.result
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case2.result
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case6.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/GroupbyNode.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case4.sql
        • tajo-core/src/main/proto/TajoWorkerProtocol.proto
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case5.sql
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case3.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/enforce/Enforcer.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/parser/HiveQLAnalyzer.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/LogicalPlanVisitor.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation7.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case1.sql
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case2.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/BasicLogicalPlanVisitor.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java
        • CHANGES
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case4.result
        • tajo-common/src/main/java/org/apache/tajo/util/TUtil.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.1-build #99 (See https://builds.apache.org/job/Tajo-0.8.1-build/99/ ) TAJO-801 : Multiple distinct should be supported. (Hyoungjun Kim via hyunsik) (hyunsik: rev 081fea3974ea927a1a40b952f67814be67d2c5ba) tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case3.sql tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case7.sql tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case1.result tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/DistinctGroupbyNode.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case6.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/ExplainLogicalPlanVisitor.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation7.sql tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case5.result tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/HashAggregateExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/ExternalSortExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/NodeType.java tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case7.result tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case2.result tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case6.result tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/GroupbyNode.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case4.sql tajo-core/src/main/proto/TajoWorkerProtocol.proto tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case5.sql tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case3.result tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java tajo-core/src/main/java/org/apache/tajo/engine/planner/enforce/Enforcer.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java tajo-core/src/main/java/org/apache/tajo/engine/parser/HiveQLAnalyzer.java tajo-core/src/main/java/org/apache/tajo/engine/planner/LogicalPlanVisitor.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation7.result tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case1.sql tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case2.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/BasicLogicalPlanVisitor.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java CHANGES tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case4.result tajo-common/src/main/java/org/apache/tajo/util/TUtil.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Tajo-master-build #219 (See https://builds.apache.org/job/Tajo-master-build/219/)
        TAJO-801: Multiple distinct should be supported. (Hyoungjun Kim via hyunsik) (hyunsik: rev 9350a8026b107da11ed2dc8457ad95d3f2153f0c)

        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case2.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/BasicLogicalPlanVisitor.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java
        • CHANGES
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/HashAggregateExec.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case3.result
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case7.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/enforce/Enforcer.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case6.sql
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case3.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/NodeType.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case5.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExplainLogicalPlanVisitor.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case1.result
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case7.sql
        • tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation7.result
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case5.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java
        • tajo-core/src/main/proto/TajoWorkerProtocol.proto
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case1.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/DistinctGroupbyNode.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case4.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/parser/HiveQLAnalyzer.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case2.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/LogicalPlanVisitor.java
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case4.result
        • tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case6.result
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/GroupbyNode.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java
        • tajo-common/src/main/java/org/apache/tajo/util/TUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
        • tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java
        • tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation7.sql
        • tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/ExternalSortExec.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Tajo-master-build #219 (See https://builds.apache.org/job/Tajo-master-build/219/ ) TAJO-801 : Multiple distinct should be supported. (Hyoungjun Kim via hyunsik) (hyunsik: rev 9350a8026b107da11ed2dc8457ad95d3f2153f0c) tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case2.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/BasicLogicalPlanVisitor.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbySortAggregationExec.java CHANGES tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/HashAggregateExec.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortAggregateExec.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case3.result tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case7.result tajo-core/src/main/java/org/apache/tajo/engine/planner/enforce/Enforcer.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case6.sql tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case3.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/NodeType.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case5.result tajo-core/src/main/java/org/apache/tajo/engine/planner/ExplainLogicalPlanVisitor.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case1.result tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case7.sql tajo-core/src/test/java/org/apache/tajo/engine/query/TestGroupByQuery.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation7.result tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case5.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/ExprAnnotator.java tajo-core/src/main/proto/TajoWorkerProtocol.proto tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case1.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/DistinctGroupbyNode.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation_case4.sql tajo-core/src/main/java/org/apache/tajo/engine/parser/HiveQLAnalyzer.java tajo-core/src/main/java/org/apache/tajo/engine/planner/global/builder/DistinctGroupbyBuilder.java tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/DistinctGroupbyHashAggregationExec.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case2.result tajo-core/src/main/java/org/apache/tajo/engine/planner/LogicalPlanVisitor.java tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case4.result tajo-core/src/test/resources/results/TestGroupByQuery/testDistinctAggregation_case6.result tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java tajo-core/src/main/java/org/apache/tajo/engine/planner/logical/GroupbyNode.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PreLogicalPlanVerifier.java tajo-common/src/main/java/org/apache/tajo/util/TUtil.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java tajo-core/src/test/resources/queries/TestGroupByQuery/testDistinctAggregation7.sql tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/ExternalSortExec.java
        Hide
        hyunsik Hyunsik Choi added a comment -

        committed it to master and branch-0.8.1.

        Show
        hyunsik Hyunsik Choi added a comment - committed it to master and branch-0.8.1.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        Excellent! The patch is great work and includes lots of tests. I'll commit it shortly.

        Show
        hyunsik Hyunsik Choi added a comment - +1 Excellent! The patch is great work and includes lots of tests. I'll commit it shortly.
        Hide
        hjkim Hyoungjun Kim added a comment -

        I create review request on review board.
        https://reviews.apache.org/r/20873/

        Show
        hjkim Hyoungjun Kim added a comment - I create review request on review board. https://reviews.apache.org/r/20873/
        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/12642464/TAJO-801.patch
        against master revision 6cc5006.

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

        +1 tests included. The patch appears to include 17 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 199 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-common tajo-core.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/397//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/397//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/397//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/12642464/TAJO-801.patch against master revision 6cc5006. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 17 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 199 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-common tajo-core. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/397//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/397//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/397//console This message is automatically generated.

          People

          • Assignee:
            hjkim Hyoungjun Kim
            Reporter:
            hjkim Hyoungjun Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development