Skip to content

Commit

Permalink
Temp commit to revert later
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyakshsharma committed Sep 4, 2024
1 parent 7772b9d commit 7a4e2e4
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion benchmarks/tpc-ds/queries/refresh/LF_CR.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SELECT d_date_sk cr_return_date_sk,
cret_merchant_credit cr_merchant_credit,
cret_return_amt + cret_return_tax + cret_return_fee - cret_refunded_cash-cret_reversed_charge-cret_merchant_credit
cr_net_loss
FROM s_catalog_returns_1
FROM iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_catalog_returns_1
LEFT OUTER JOIN date_dim
ON ( CAST(cret_return_date AS DATE) = d_date )
LEFT OUTER JOIN time_dim
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/tpc-ds/queries/refresh/LF_CS.sql
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SELECT d1.d_date_sk cs_sold_date_sk,
CS_NET_PAID_INC_SHIP_TAX,
( ( clin_sales_price * clin_quantity ) - clin_coupon_amt ) - (
clin_quantity * i_wholesale_cost ) cs_net_profit
FROM s_catalog_order_1
FROM iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_catalog_order_1
LEFT OUTER JOIN date_dim d1
ON ( CAST(cord_order_date AS DATE) = d1.d_date )
LEFT OUTER JOIN time_dim
Expand All @@ -75,7 +75,7 @@ FROM s_catalog_order_1
AND cc_rec_end_date IS NULL )
LEFT OUTER JOIN ship_mode
ON ( cord_ship_mode_id = sm_ship_mode_id )
JOIN s_catalog_order_lineitem_1
JOIN iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_catalog_order_lineitem_1
ON ( cord_order_id = clin_order_id )
LEFT OUTER JOIN date_dim d2
ON ( CAST(clin_ship_date AS DATE) = d2.d_date )
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tpc-ds/queries/refresh/LF_I.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SELECT d_date_sk inv_date_sk,
i_item_sk inv_item_sk,
w_warehouse_sk inv_warehouse_sk,
invn_qty_on_hand inv_quantity_on_hand
FROM s_inventory_1
FROM iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_inventory_1
LEFT OUTER JOIN warehouse
ON ( invn_warehouse_id = w_warehouse_id )
LEFT OUTER JOIN item
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tpc-ds/queries/refresh/LF_SR.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ SELECT d_date_sk sr_returned_date_sk,
+ sret_return_fee
- sret_refunded_cash-sret_reversed_charge-sret_store_credit
sr_net_loss
FROM s_store_returns_1
FROM iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_store_returns_1
LEFT OUTER JOIN date_dim
ON ( CAST(sret_return_date AS DATE) = d_date )
LEFT OUTER JOIN time_dim
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/tpc-ds/queries/refresh/LF_SS.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ AS SELECT d_date_sk ss_sold_date_sk,
((plin_sale_price * plin_quantity)-plin_coupon_amt)-(plin_quantity*i_wholesale_cost)
ss_net_profit
FROM
s_purchase_1
iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_purchase_1
LEFT OUTER JOIN customer ON (purc_customer_id = c_customer_id)
LEFT OUTER JOIN store ON (purc_store_id = s_store_id)
LEFT OUTER JOIN date_dim ON (cast(purc_purchase_date as date) = d_date)
LEFT OUTER JOIN time_dim ON (PURC_PURCHASE_TIME = t_time)
JOIN s_purchase_lineitem_1 ON (purc_purchase_id = plin_purchase_id)
JOIN iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_purchase_lineitem_1 ON (purc_purchase_id = plin_purchase_id)
LEFT OUTER JOIN promotion ON plin_promotion_id = p_promo_id
LEFT OUTER JOIN item ON plin_item_id = i_item_id
WHERE
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tpc-ds/queries/refresh/LF_WR.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ AS SELECT d_date_sk wr_return_date_sk
,wret_account_credit wr_account_credit
,wret_return_amt+wret_return_tax+wret_return_fee
-wret_refunded_cash-wret_reversed_charge-wret_account_credit wr_net_loss
FROM s_web_returns_1
FROM iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_web_returns_1
LEFT OUTER JOIN date_dim ON (cast(wret_return_date as date) = d_date)
LEFT OUTER JOIN time_dim ON ((CAST(SUBSTR(wret_return_time,1,2) AS integer)*3600
+CAST(SUBSTR(wret_return_time,4,2) AS integer)*60+CAST(SUBSTR(wret_return_time,7,2) AS integer))=t_time)
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/tpc-ds/queries/refresh/LF_WS.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ AS SELECT d1.d_date_sk ws_sold_date_sk,
((wlin_sales_price * wlin_quantity)-wlin_coupon_amt)-(i_wholesale_cost * wlin_quantity)
WS_NET_PROFIT
FROM
s_web_order_1
iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_web_order_1
LEFT OUTER JOIN date_dim d1 ON (cast(word_order_date as date) = d1.d_date)
LEFT OUTER JOIN time_dim ON (word_order_time = t_time)
LEFT OUTER JOIN customer c1 ON (word_bill_customer_id = c1.c_customer_id)
LEFT OUTER JOIN customer c2 ON (word_ship_customer_id = c2.c_customer_id)
LEFT OUTER JOIN web_site ON (word_web_site_id = web_site_id AND web_rec_end_date IS NULL)
LEFT OUTER JOIN ship_mode ON (word_ship_mode_id = sm_ship_mode_id)
JOIN s_web_order_lineitem_1 ON (word_order_id = wlin_order_id)
JOIN iceberg.tpcds_sf1_refresh_source_iceberg_corrected.s_web_order_lineitem_1 ON (word_order_id = wlin_order_id)
LEFT OUTER JOIN date_dim d2 ON (cast(wlin_ship_date as date) = d2.d_date)
LEFT OUTER JOIN item ON (wlin_item_id = i_item_id AND i_rec_end_date IS NULL)
LEFT OUTER JOIN web_page ON (wlin_web_page_id = wp_web_page_id AND wp_rec_end_date IS NULL)
Expand Down

0 comments on commit 7a4e2e4

Please sign in to comment.