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

alias name which is the same to existing column name may cause NPE during PPD

    Details

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

      Description

      The following query will cause NPE. I attached the stacktrace.

        SELECT
          T1.l_orderkey
        FROM
          LINEITEM
        INNER JOIN (
          SELECT
            T1.l_orderkey
          FROM (
            SELECT
              LINEITEM.l_orderkey AS l_orderkey
            FROM
              LINEITEM
          ) T1
        ) T1 ON LINEITEM.l_orderkey=T1.l_orderkey
      
      2014-07-24 13:58:40,866 ERROR: org.apache.tajo.master.GlobalEngine (executeQuery(150)) - 
      Stack Trace:
      java.lang.NullPointerException
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager.getTarget(ProjectionPushDownRule.java:311)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager$FilteredTargetIterator.<init>(ProjectionPushDownRule.java:362)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager.getFilteredTargets(ProjectionPushDownRule.java:352)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitScan(ProjectionPushDownRule.java:1053)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitScan(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:102)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:155)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:457)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitTableSubQuery(BasicLogicalPlanVisitor.java:269)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:1106)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:99)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:155)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:457)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitTableSubQuery(BasicLogicalPlanVisitor.java:269)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:1106)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:99)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:888)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:87)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:155)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:457)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitRoot(BasicLogicalPlanVisitor.java:145)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:440)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:43)
      	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:58)
      	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.rewrite(ProjectionPushDownRule.java:77)
      	at org.apache.tajo.engine.planner.rewrite.BasicQueryRewriteEngine.rewrite(BasicQueryRewriteEngine.java:63)
      	at org.apache.tajo.engine.planner.LogicalOptimizer.optimize(LogicalOptimizer.java:101)
      	at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:475)
      	at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:145)
      

        Attachments

          Issue Links

            Activity

              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: