Details

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

      Description

      I tested TPC-DS Q34 query as follows:

      • SQL
        select c_last_name
              ,c_first_name
              ,c_salutation
              ,c_preferred_cust_flag
              ,ss_ticket_number
              ,cnt from
          (select ss_ticket_number
                 ,ss_customer_sk
                 ,count(*) cnt
           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
           where
               (date_dim.d_dom between 1 and 3 or date_dim.d_dom between 25 and 28)
           and (household_demographics.hd_buy_potential = '>10000' or
                household_demographics.hd_buy_potential = 'unknown')
           and household_demographics.hd_vehicle_count > 0
           and (case when household_demographics.hd_vehicle_count > 0 
               then household_demographics.hd_dep_count/ household_demographics.hd_vehicle_count 
               else null 
               end)  > 1.2
           and date_dim.d_year in (1998,1999,2000)
           and store.s_county in ('Williamson County','Williamson County','Williamson County','Williamson County',
                                  'Williamson County','Williamson County','Williamson County','Williamson County')
           group by ss_ticket_number,ss_customer_sk) dn
           JOIN customer ON dn.ss_customer_sk = customer.c_customer_sk
           WHERE
             cnt between 15 and 20
           order by c_last_name,c_first_name,c_salutation,c_preferred_cust_flag desc;
        
      • Expected Result
        It must returns 2,905 rows.
      • Actual Result
        java.lang.NullPointerException
        	at org.apache.tajo.catalog.Column.equals(Column.java:115)
        	at java.util.ArrayList.indexOf(ArrayList.java:298)
        	at java.util.ArrayList.contains(ArrayList.java:281)
        	at java.util.AbstractCollection.containsAll(AbstractCollection.java:316)
        	at org.apache.tajo.catalog.Schema.containsAll(Schema.java:269)
        	at org.apache.tajo.engine.planner.LogicalPlanner.checkIfBeEvaluatedAtRelation(LogicalPlanner.java:1556)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitScan(FilterPushDownRule.java:300)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitScan(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:96)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitJoin(FilterPushDownRule.java:208)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitJoin(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:81)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitFilter(FilterPushDownRule.java:66)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitFilter(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:78)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitGroupBy(BasicLogicalPlanVisitor.java:182)
        	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.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:63)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:45)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitTableSubQuery(FilterPushDownRule.java:288)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitTableSubQuery(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:93)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitJoin(FilterPushDownRule.java:209)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitJoin(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:81)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitFilter(FilterPushDownRule.java:66)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.visitFilter(FilterPushDownRule.java:33)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:78)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitSort(BasicLogicalPlanVisitor.java:164)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:69)
        	at org.apache.tajo.engine.planner.BasicLogicalPlanVisitor.visitProjection(BasicLogicalPlanVisitor.java:146)
        	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.BasicLogicalPlanVisitor.visit(BasicLogicalPlanVisitor.java:58)
        	at org.apache.tajo.engine.planner.rewrite.FilterPushDownRule.rewrite(FilterPushDownRule.java:54)
        	at org.apache.tajo.engine.planner.rewrite.BasicQueryRewriteEngine.rewrite(BasicQueryRewriteEngine.java:63)
        

        Issue Links

          Activity

          Hide
          blrunner Jaehwa Jung added a comment -

          This issue includes various type of bugs.

          Show
          blrunner Jaehwa Jung added a comment - This issue includes various type of bugs.
          Hide
          blrunner Jaehwa Jung added a comment -

          We can't reproduce NPE again. But we need to test this query because of related issues such as TAJO-785.

          Show
          blrunner Jaehwa Jung added a comment - We can't reproduce NPE again. But we need to test this query because of related issues such as TAJO-785 .

            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