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

A subquery with the same column alias caused planning error.

    Details

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

      Description

      I ran the bellow query.

      select nation.n_nationkey as n_nationkey,
             nation.n_name as n_name
      from nation 
      inner join (select distinct c_nationkey as n_nationkey from customer) a
      on nation.n_nationkey = a.n_nationkey     
      
      2014-04-07 10:52:26,419 ERROR org.apache.tajo.master.querymaster.QueryMasterTask: Already Exists Field: tpch100.a.n_nationkey
      org.apache.tajo.catalog.exception.AlreadyExistsFieldException: Already Exists Field: tpch100.a.n_nationkey
              at org.apache.tajo.catalog.Schema.addColumn(Schema.java:287)
              at org.apache.tajo.catalog.Schema.addColumn(Schema.java:299)
              at org.apache.tajo.catalog.Schema.clone(Schema.java:330)
              at org.apache.tajo.engine.utils.SchemaUtil.clone(SchemaUtil.java:66)
              at org.apache.tajo.engine.planner.global.DataChannel.setSchema(DataChannel.java:180)
              at org.apache.tajo.engine.planner.global.DataChannel.<init>(DataChannel.java:55)
              at org.apache.tajo.engine.planner.global.GlobalPlanner.createDataChannelFromJoin(GlobalPlanner.java:157)
              at org.apache.tajo.engine.planner.global.GlobalPlanner.buildJoinPlan(GlobalPlanner.java:258)
              at org.apache.tajo.engine.planner.global.GlobalPlanner.access$300(GlobalPlanner.java:55)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitJoin(GlobalPlanner.java:1006)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitJoin(GlobalPlanner.java:867)
              at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:81)
              at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitRoot(BasicLogicalPlanVisitor.java:133)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitRoot(GlobalPlanner.java:872)
              at org.apache.tajo.engine.planner.global.GlobalPlanner$DistributedPlannerVisitor.visitRoot(GlobalPlanner.java:867)
              at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:58)
              at org.apache.tajo.engine.planner.global.GlobalPlanner.build(GlobalPlanner.java:113)
              at org.apache.tajo.master.querymaster.QueryMasterTask.startQuery(QueryMasterTask.java:346)
              at org.apache.tajo.master.querymaster.QueryMasterTask.start(QueryMasterTask.java:167)
              at org.apache.tajo.master.querymaster.QueryMaster$QueryStartEventHandler.handle(QueryMaster.java:379)
              at org.apache.tajo.master.querymaster.QueryMaster$QueryStartEventHandler.handle(QueryMaster.java:371)
              at org.apache.tajo.master.TajoAsyncDispatcher.dispatch(TajoAsyncDispatcher.java:137)
              at org.apache.tajo.master.TajoAsyncDispatcher$1.run(TajoAsyncDispatcher.java:79)
              at java.lang.Thread.run(Thread.java:744)
      
      1. TAJO-739.patch
        5 kB
        Hyoungjun Kim

        Activity

        Hide
        hjkim Hyoungjun Kim added a comment - - edited

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

        Show
        hjkim Hyoungjun Kim added a comment - - edited Created a review request against branch master in reviewboard https://reviews.apache.org/r/20073/
        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/12638946/TAJO-739.patch
        against master revision 5b0cf0d.

        +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 201 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/tajo-core-backend.

        Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/309//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/309//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html
        Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/309//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/12638946/TAJO-739.patch against master revision 5b0cf0d. +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 201 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/tajo-core-backend. Test results: https://builds.apache.org/job/PreCommit-TAJO-Build/309//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-TAJO-Build/309//artifact/incubator-tajo/patchprocess/newPatchFindbugsWarningstajo-core-backend.html Console output: https://builds.apache.org/job/PreCommit-TAJO-Build/309//console This message is automatically generated.
        Hide
        hyunsik Hyunsik Choi added a comment -

        +1

        The patch looks good to me.

        Show
        hyunsik Hyunsik Choi added a comment - +1 The patch looks good to me.
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-master-build #159 (See https://builds.apache.org/job/Tajo-master-build/159/)
        TAJO-739: A subquery with the same column alias caused planning error. (hyoungjunkim via hyunsik) (hyunsik: rev 957d2d3f410de6ed6be3f4ef8dd4121caf3d4994)

        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/GlobalEngine.java
        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestCaseByCases/testTAJO739Case.sql
        • CHANGES.txt
        • 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/ProjectionNode.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestCaseByCases/testTAJO739Case.result
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-master-build #159 (See https://builds.apache.org/job/Tajo-master-build/159/ ) TAJO-739 : A subquery with the same column alias caused planning error. (hyoungjunkim via hyunsik) (hyunsik: rev 957d2d3f410de6ed6be3f4ef8dd4121caf3d4994) tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/GlobalEngine.java tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java tajo-core/tajo-core-backend/src/test/resources/queries/TestCaseByCases/testTAJO739Case.sql CHANGES.txt 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/ProjectionNode.java tajo-core/tajo-core-backend/src/test/resources/results/TestCaseByCases/testTAJO739Case.result
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Tajo-0.8.0-build #59 (See https://builds.apache.org/job/Tajo-0.8.0-build/59/)
        TAJO-739: A subquery with the same column alias caused planning error. (hyoungjunkim via hyunsik) (hyunsik: rev 2c1064ce68e529ec7ba779b27b45a4b3f99f280d)

        • tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java
        • CHANGES.txt
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/GlobalEngine.java
        • tajo-core/tajo-core-backend/src/test/resources/results/TestCaseByCases/testTAJO739Case.result
        • tajo-core/tajo-core-backend/src/test/resources/queries/TestCaseByCases/testTAJO739Case.sql
        • tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ProjectionNode.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Tajo-0.8.0-build #59 (See https://builds.apache.org/job/Tajo-0.8.0-build/59/ ) TAJO-739 : A subquery with the same column alias caused planning error. (hyoungjunkim via hyunsik) (hyunsik: rev 2c1064ce68e529ec7ba779b27b45a4b3f99f280d) tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/query/TestCaseByCases.java tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/LogicalPlan.java CHANGES.txt tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/GlobalEngine.java tajo-core/tajo-core-backend/src/test/resources/results/TestCaseByCases/testTAJO739Case.result tajo-core/tajo-core-backend/src/test/resources/queries/TestCaseByCases/testTAJO739Case.sql tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/engine/planner/logical/ProjectionNode.java

          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