Skip to content

Commit b2ded11

Browse files
authored
fix: add limit clause to tpc-h queries (#3437)
Fixes: #3433 Note that the row count for sf=10 query 13 was corrected to 45 rows, unrelated to introducing the `limit` clause. --------- Signed-off-by: Alexander Droste <[email protected]>
1 parent 332036c commit b2ded11

File tree

8 files changed

+19
-12
lines changed

8 files changed

+19
-12
lines changed

.github/workflows/labels.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@ name: PR Labels
22

33
on:
44
pull_request:
5-
types: [ opened, reopened, synchronize, labeled, unlabeled ] # Trigger on these PR activities
5+
types: [ opened, reopened, synchronize, labeled, unlabeled ] # Trigger on these PR activities
66

77
jobs:
88
check_changelog_label:
99
name: Validate Changelog Label
1010
runs-on: ubuntu-latest
1111
permissions:
12-
pull-requests: read # Grant permission to read PR information
12+
pull-requests: read # Grant permission to read PR information
1313
steps:
1414
- name: Get PR Labels from API
1515
id: get_labels_api
16-
uses: octokit/[email protected] # Use an action to make API requests
16+
uses: octokit/[email protected] # Use an action to make API requests
1717
with:
1818
route: GET /repos/{owner}/{repo}/issues/{pull_number}/labels
1919
owner: ${{ github.repository_owner }}
2020
repo: ${{ github.event.repository.name }}
2121
pull_number: ${{ github.event.pull_request.number }}
2222
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided token
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided token
2424

2525
- name: Extract and Check Labels
26+
env:
27+
API_RESPONSE: ${{ steps.get_labels_api.outputs.data }}
2628
run: |
2729
REQUIRED_LABELS=(
2830
"chore"
@@ -38,7 +40,6 @@ jobs:
3840
3941
# Parse the response from the API call
4042
# The API returns an array of label objects, we need just the 'name' property
41-
API_RESPONSE='${{ steps.get_labels_api.outputs.data }}'
4243
echo "API Response: $API_RESPONSE"
4344
4445
# Extract only the label names into a JSON array

bench-vortex/src/bin/tpch.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ fn main() -> anyhow::Result<()> {
142142
format
143143
};
144144
let opts = DuckdbTpcOptions::new("tpch".to_data_path(), TpcDataset::TpcH, format)
145+
.with_scale_factor(args.scale_factor)
145146
.with_duckdb_path(duckdb_resolved_path.clone());
146147
generate_tpc(opts)?;
147148
}

bench-vortex/src/tpch/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ pub use execute::*;
2828
pub const TPC_H_ROW_COUNT_ARRAY_LENGTH: usize = 23;
2929
pub const EXPECTED_ROW_COUNTS_SF1: [usize; TPC_H_ROW_COUNT_ARRAY_LENGTH] = [
3030
// The 0th entry is a dummy so that Query 1's row count is at index 1.
31-
0, 4, 460, 11620, 5, 5, 1, 4, 2, 175, 37967, 1048, 2, 42, 1, 1, 18314, 1, 57, 1, 186, 411, 7,
31+
0, 4, 100, 10, 5, 5, 1, 4, 2, 175, 20, 1048, 2, 42, 1, 1, 18314, 1, 57, 1, 186, 100, 7,
3232
];
3333
pub const EXPECTED_ROW_COUNTS_SF10: [usize; TPC_H_ROW_COUNT_ARRAY_LENGTH] = [
3434
// The 0th entry is a dummy so that Query 1's row count is at index 1.
3535
//
3636
// Generated by executing the SQL in each query file using duckdb with the table names replaced
3737
// by "$NAME.parquet".
38-
0, 4, 4667, 114003, 5, 5, 1, 4, 2, 175, 381105, 0, 2, 46, 1, 1, 27840, 1, 624, 1, 1804, 4009, 7,
38+
0, 4, 100, 10, 5, 5, 1, 4, 2, 175, 20, 0, 2, 45, 1, 1, 27840, 1, 100, 1, 1804, 100, 7,
3939
];
4040

4141
// Generate table dataset.

bench-vortex/tpch/q10.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ group by
2828
c_address,
2929
c_comment
3030
order by
31-
revenue desc;
31+
revenue desc
32+
limit 20;

bench-vortex/tpch/q18.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ group by
2929
o_totalprice
3030
order by
3131
o_totalprice desc,
32-
o_orderdate;
32+
o_orderdate
33+
limit 100;

bench-vortex/tpch/q2.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ order by
4040
s_acctbal desc,
4141
n_name,
4242
s_name,
43-
p_partkey;
43+
p_partkey
44+
limit 100;

bench-vortex/tpch/q21.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ group by
3636
s_name
3737
order by
3838
numwait desc,
39-
s_name;
39+
s_name
40+
limit 100;

bench-vortex/tpch/q3.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ group by
1919
o_shippriority
2020
order by
2121
revenue desc,
22-
o_orderdate;
22+
o_orderdate
23+
limit 10;

0 commit comments

Comments
 (0)