Skip to content

Commit 3d06bed

Browse files
Dandandanblaginin
andauthored
Chore: Fix TPC-DS schema/query (fixes q30 run) (#22086)
## Which issue does this PR close? - Closes #. ## Rationale for this change TPC-DS query 30 failed in the benchmark because the query referenced `c_last_review_date`, while the SF1 parquet benchmark schema exposes the customer review date key as `c_last_review_date_sk`. This was updated in newer tpcds spec. The query that uses the column now succeeds: ``` │ QQuery 30 │ FAIL │ 30.38 / 30.73 ±0.34 / 31.34 ms │ incomparable │ ``` ## What changes are included in this PR? This updates query 30 to use `c_last_review_date_sk` and aligns the TPC-DS planning test schema with the benchmark parquet schema. ## Are these changes tested? ## Are there any user-facing changes? No. This fixes a benchmark query/schema mismatch. Co-authored-by: Dmitrii Blaginin <dmitrii@blaginin.me>
1 parent eec9e9d commit 3d06bed

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

datafusion/core/tests/tpc-ds/30.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ with customer_total_return as
1414
,ca_state)
1515
select c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag
1616
,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address
17-
,c_last_review_date,ctr_total_return
17+
,c_last_review_date_sk,ctr_total_return
1818
from customer_total_return ctr1
1919
,customer_address
2020
,customer
@@ -26,7 +26,6 @@ with customer_total_return as
2626
and ctr1.ctr_customer_sk = c_customer_sk
2727
order by c_customer_id,c_salutation,c_first_name,c_last_name,c_preferred_cust_flag
2828
,c_birth_day,c_birth_month,c_birth_year,c_birth_country,c_login,c_email_address
29-
,c_last_review_date,ctr_total_return
29+
,c_last_review_date_sk,ctr_total_return
3030
limit 100;
3131

32-

test-utils/src/tpcds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ pub fn tpcds_schemas() -> Vec<TableDef> {
299299
Field::new("c_birth_country", DataType::Utf8, false),
300300
Field::new("c_login", DataType::Utf8, false),
301301
Field::new("c_email_address", DataType::Utf8, false),
302-
Field::new("c_last_review_date", DataType::Utf8, false),
302+
Field::new("c_last_review_date_sk", DataType::Int32, false),
303303
]),
304304
),
305305
TableDef::new(

0 commit comments

Comments
 (0)