ngsg commented on PR #5417:
URL: https://github.com/apache/hive/pull/5417#issuecomment-2327785741

   I reproduced the same issue by running the following query on 10TB dataset. 
I'll share a better version that works on TestMiniLlapLocalCluster later.
   ```
   with
   a1 as (select distinct inv_date_sk from inventory, date_dim where 
inv_date_sk = d_date_sk and d_year = 2000 and d_dom = 1),
   a2 as (select * from web_returns, a1 where inv_date_sk = 
wr_returned_date_sk),
   a3 as (select wr_item_sk,
   max(wr_refunded_customer_sk) col1, max(wr_refunded_cdemo_sk) col2, 
max(wr_refunded_hdemo_sk) col3, max(wr_refunded_addr_sk) col4, 
max(wr_returning_customer_sk) col5, max(wr_returning_cdemo_sk) col6, 
max(wr_returning_hdemo_sk) col7, max(wr_returning_addr_sk) col8, 
max(wr_web_page_sk) col9, max(wr_reason_sk) col10, max(wr_order_number) col11, 
max(wr_return_quantity) col12, max(wr_return_amt) col13, max(wr_return_tax) 
col14, max(wr_return_amt_inc_tax) col15, max(wr_fee) col16, 
max(wr_return_ship_cost) col17, max(wr_refunded_cash) col18, 
max(wr_reversed_charge) col19 from a2 group by wr_item_sk),
   a4 as (select wr_item_sk,
   min(wr_refunded_customer_sk) col1, min(wr_refunded_cdemo_sk) col2, 
min(wr_refunded_hdemo_sk) col3, min(wr_refunded_addr_sk) col4, 
min(wr_returning_customer_sk) col5, min(wr_returning_cdemo_sk) col6, 
min(wr_returning_hdemo_sk) col7, min(wr_returning_addr_sk) col8, 
min(wr_web_page_sk) col9, min(wr_reason_sk) col10, min(wr_order_number) col11, 
min(wr_return_quantity) col12, min(wr_return_amt) col13, min(wr_return_tax) 
col14, min(wr_return_amt_inc_tax) col15, min(wr_fee) col16, 
min(wr_return_ship_cost) col17, min(wr_refunded_cash) col18, 
min(wr_reversed_charge) col19 from a2 group by wr_item_sk)
   select * from a3 join a4 on a3.wr_item_sk = a4.wr_item_sk and a3.col1 + 
a3.col5 < a4.col11 + a4.col8;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to