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)
      

        Attachments

        1. TAJO-739.patch
          5 kB
          Hyoungjun Kim

          Activity

            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: