Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 0.9.0
    • Component/s: Planner/Optimizer
    • Labels:
      None

      Description

      I tested TPC-DS Q46 query as follows:

      • SQL
        select  c_last_name
               ,c_first_name
               ,ca_city
               ,bought_city
               ,ss_ticket_number
               ,amt,profit
         from
           (select ss_ticket_number
                  ,ss_customer_sk
                  ,ca_city as bought_city
                  ,sum(ss_coupon_amt) as amt
                  ,sum(ss_net_profit) as profit
            from store_sales
                 JOIN date_dim ON store_sales.ss_sold_date_sk = date_dim.d_date_sk
                 JOIN store ON store_sales.ss_store_sk = store.s_store_sk
                 JOIN household_demographics ON store_sales.ss_hdemo_sk = household_demographics.hd_demo_sk
                 JOIN customer_address ON store_sales.ss_addr_sk = customer_address.ca_address_sk
            where
                (household_demographics.hd_dep_count = 5 or
                 household_demographics.hd_vehicle_count= 3)
            and date_dim.d_dow in (6,0)
            and date_dim.d_year in (1999,1999+1,1999+2)
            and store.s_city in ('Midway','Fairview','Fairview','Fairview','Fairview')
            group by ss_ticket_number,ss_customer_sk,ss_addr_sk,ca_city) dn
          JOIN customer ON dn.ss_customer_sk = customer.c_customer_sk
          JOIN customer_address ON customer.c_current_addr_sk = customer_address.ca_address_sk
            where
              customer_address.ca_city <> dn.bought_city
          order by c_last_name
                  ,c_first_name
                  ,ca_city
                  ,bought_city
                  ,ss_ticket_number
          limit 100;
        
      • Actual Result
        java.lang.NullPointerException
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule$TargetListManager.getTarget(ProjectionPushDownRule.java:256)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:728)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:81)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitGroupBy(BasicLogicalPlanVisitor.java:182)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitGroupBy(ProjectionPushDownRule.java:571)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitGroupBy(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:75)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:146)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:399)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitTableSubQuery(BasicLogicalPlanVisitor.java:243)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:925)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitTableSubQuery(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:93)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:707)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitJoin(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:81)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitSort(BasicLogicalPlanVisitor.java:164)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitSort(ProjectionPushDownRule.java:487)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitSort(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:69)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitLimit(BasicLogicalPlanVisitor.java:155)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitLimit(ProjectionPushDownRule.java:468)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitLimit(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:66)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:146)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:399)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitProjection(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitRoot(BasicLogicalPlanVisitor.java:136)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:382)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.visitRoot(ProjectionPushDownRule.java:42)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:58)
        	at org.apache.tajo.engine.planner.rewrite.ProjectionPushDownRule.rewrite(ProjectionPushDownRule.java:73)
        	at org.apache.tajo.engine.planner.rewrite.BasicQueryRewriteEngine.rewrite(BasicQueryRewriteEngine.java:63)
        	at org.apache.tajo.engine.planner.LogicalOptimizer.optimize(LogicalOptimizer.java:74)
        

        Activity

        Hide
        blrunner Jaehwa Jung added a comment -

        We can't reproduce it again.

        Show
        blrunner Jaehwa Jung added a comment - We can't reproduce it again.

          People

          • Assignee:
            blrunner Jaehwa Jung
            Reporter:
            blrunner Jaehwa Jung
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development