drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhishek Girish (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4981) TPC-DS Query 75 fails on MapR-DB JSON Tables
Date Fri, 28 Oct 2016 22:16:59 GMT
Abhishek Girish created DRILL-4981:
--------------------------------------

             Summary: TPC-DS Query 75 fails on MapR-DB JSON Tables
                 Key: DRILL-4981
                 URL: https://issues.apache.org/jira/browse/DRILL-4981
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - MapRDB
    Affects Versions: 1.9.0
            Reporter: Abhishek Girish
            Assignee: Smidth Panchamia


TPC-DS Query 75 fails on MapR-DB JSON Tables, but succeeds on Text, Parquet & JSON File
formats. 

I'll work on a simpler repro. Find the original query & error below:

{code}
WITH all_sales 
     AS (SELECT d_year, 
                i_brand_id, 
                i_class_id, 
                i_category_id, 
                i_manufact_id, 
                Sum(sales_cnt) AS sales_cnt, 
                Sum(sales_amt) AS sales_amt 
         FROM   (SELECT d_year, 
                        i_brand_id, 
                        i_class_id, 
                        i_category_id, 
                        i_manufact_id, 
                        cs_quantity - COALESCE(cr_return_quantity, 0)        AS 
                        sales_cnt, 
                        cs_ext_sales_price - COALESCE(cr_return_amount, 0.0) AS 
                        sales_amt 
                 FROM   catalog_sales 
                        JOIN item 
                          ON i_item_sk = cs_item_sk 
                        JOIN date_dim 
                          ON d_date_sk = cs_sold_date_sk 
                        LEFT JOIN catalog_returns 
                               ON ( cs_order_number = cr_order_number 
                                    AND cs_item_sk = cr_item_sk ) 
                 WHERE  i_category = 'Men' 
                 UNION 
                 SELECT d_year, 
                        i_brand_id, 
                        i_class_id, 
                        i_category_id, 
                        i_manufact_id, 
                        ss_quantity - COALESCE(sr_return_quantity, 0)     AS 
                        sales_cnt, 
                        ss_ext_sales_price - COALESCE(sr_return_amt, 0.0) AS 
                        sales_amt 
                 FROM   store_sales 
                        JOIN item 
                          ON i_item_sk = ss_item_sk 
                        JOIN date_dim 
                          ON d_date_sk = ss_sold_date_sk 
                        LEFT JOIN store_returns 
                               ON ( ss_ticket_number = sr_ticket_number 
                                    AND ss_item_sk = sr_item_sk ) 
                 WHERE  i_category = 'Men' 
                 UNION 
                 SELECT d_year, 
                        i_brand_id, 
                        i_class_id, 
                        i_category_id, 
                        i_manufact_id, 
                        ws_quantity - COALESCE(wr_return_quantity, 0)     AS 
                        sales_cnt, 
                        ws_ext_sales_price - COALESCE(wr_return_amt, 0.0) AS 
                        sales_amt 
                 FROM   web_sales 
                        JOIN item 
                          ON i_item_sk = ws_item_sk 
                        JOIN date_dim 
                          ON d_date_sk = ws_sold_date_sk 
                        LEFT JOIN web_returns 
                               ON ( ws_order_number = wr_order_number 
                                    AND ws_item_sk = wr_item_sk ) 
                 WHERE  i_category = 'Men') sales_detail 
         GROUP  BY d_year, 
                   i_brand_id, 
                   i_class_id, 
                   i_category_id, 
                   i_manufact_id) 
SELECT prev_yr.d_year                        AS prev_year, 
               curr_yr.d_year                        AS year1, 
               curr_yr.i_brand_id, 
               curr_yr.i_class_id, 
               curr_yr.i_category_id, 
               curr_yr.i_manufact_id, 
               prev_yr.sales_cnt                     AS prev_yr_cnt, 
               curr_yr.sales_cnt                     AS curr_yr_cnt, 
               curr_yr.sales_cnt - prev_yr.sales_cnt AS sales_cnt_diff, 
               curr_yr.sales_amt - prev_yr.sales_amt AS sales_amt_diff 
FROM   all_sales curr_yr, 
       all_sales prev_yr 
WHERE  curr_yr.i_brand_id = prev_yr.i_brand_id 
       AND curr_yr.i_class_id = prev_yr.i_class_id 
       AND curr_yr.i_category_id = prev_yr.i_category_id 
       AND curr_yr.i_manufact_id = prev_yr.i_manufact_id 
       AND curr_yr.d_year = 2002 
       AND prev_yr.d_year = 2002 - 1 
       AND Cast(curr_yr.sales_cnt AS DECIMAL(17, 2)) / Cast(prev_yr.sales_cnt AS 
                                                                DECIMAL(17, 2)) 
           < 0.9 
ORDER  BY sales_cnt_diff
LIMIT 100
{code}

Error:
{code}
Failed with exception
java.sql.SQLException: SYSTEM ERROR: NullPointerException


[Error Id: 128bb62b-a6af-4b8f-90d5-d9f516b9e3d4 on atsqa6c83.qa.lab:31010]

  (org.apache.drill.exec.work.foreman.ForemanException) Unexpected exception during fragment
initialization: null
    org.apache.drill.exec.work.foreman.Foreman.run():281
    java.util.concurrent.ThreadPoolExecutor.runWorker():1145
    java.util.concurrent.ThreadPoolExecutor$Worker.run():615
    java.lang.Thread.run():744
  Caused By (java.lang.NullPointerException) null
    org.apache.drill.exec.store.mapr.db.MapRDBGroupScan.applyAssignments():205
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitGroupScan():116
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitGroupScan():103
    org.apache.drill.exec.physical.base.AbstractGroupScan.accept():63
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject():77
    org.apache.drill.exec.physical.config.Project.accept():51
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitHashJoin():150
    org.apache.drill.exec.physical.config.HashJoinPOP.accept():64
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject():77
    org.apache.drill.exec.physical.config.Project.accept():51
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitHashJoin():150
    org.apache.drill.exec.physical.config.HashJoinPOP.accept():64
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject():77
    org.apache.drill.exec.physical.config.Project.accept():51
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitHashJoin():150
    org.apache.drill.exec.physical.config.HashJoinPOP.accept():64
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject():77
    org.apache.drill.exec.physical.config.Project.accept():51
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitUnion():57
    org.apache.drill.exec.physical.config.UnionAll.accept():44
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitHashAggregate():102
    org.apache.drill.exec.physical.config.HashAggregate.accept():67
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():103
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitProject():77
    org.apache.drill.exec.physical.config.Project.accept():51
    org.apache.drill.exec.physical.base.AbstractPhysicalVisitor.visitChildren():138
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitOp():134
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitExchange():108
    org.apache.drill.exec.planner.fragment.Wrapper$AssignEndpointsToScanAndStore.visitExchange():103
    org.apache.drill.exec.physical.base.AbstractExchange.accept():123
    org.apache.drill.exec.planner.fragment.Wrapper.assignEndpoints():148
    org.apache.drill.exec.planner.fragment.SoftAffinityFragmentParallelizer.parallelizeFragment():86
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.parallelizeFragment():251
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.parallelizeFragment():243
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.parallelizeFragment():243
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.parallelizeFragment():243
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.parallelizeFragment():243
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.getFragmentsHelper():167
    org.apache.drill.exec.planner.fragment.SimpleParallelizer.getFragments():126
    org.apache.drill.exec.work.foreman.Foreman.getQueryWorkUnit():596
    org.apache.drill.exec.work.foreman.Foreman.runPhysicalPlan():426
    org.apache.drill.exec.work.foreman.Foreman.runSQL():1010
    org.apache.drill.exec.work.foreman.Foreman.run():264
    java.util.concurrent.ThreadPoolExecutor.runWorker():1145
    java.util.concurrent.ThreadPoolExecutor$Worker.run():615
    java.lang.Thread.run():744

	at org.apache.drill.jdbc.impl.DrillCursor.nextRowInternally(DrillCursor.java:232)
	at org.apache.drill.jdbc.impl.DrillCursor.loadInitialSchema(DrillCursor.java:275)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:1943)
	at org.apache.drill.jdbc.impl.DrillResultSetImpl.execute(DrillResultSetImpl.java:76)
	at oadd.org.apache.calcite.avatica.AvaticaConnection$1.execute(AvaticaConnection.java:473)
	at org.apache.drill.jdbc.impl.DrillMetaImpl.prepareAndExecute(DrillMetaImpl.java:465)
	at oadd.org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477)
	at org.apache.drill.jdbc.impl.DrillConnectionImpl.prepareAndExecuteInternal(DrillConnectionImpl.java:169)
	at oadd.org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:109)
	at oadd.org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:130)
	at org.apache.drill.jdbc.impl.DrillStatementImpl.executeQuery(DrillStatementImpl.java:112)
	at org.apache.drill.test.framework.DrillTestJdbc.executeQuery(DrillTestJdbc.java:175)
	at org.apache.drill.test.framework.DrillTestJdbc.run(DrillTestJdbc.java:100)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:744)
Caused by: oadd.org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: NullPointerException
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message