Skip to content

Commit 14ca46c

Browse files
committed
Merge remote-tracking branch 'origin/main' into use-clap-subcommands
2 parents d41204a + 31d515c commit 14ca46c

8 files changed

Lines changed: 35 additions & 52 deletions

File tree

.github/workflows/build-py-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
manylinux: ${{ matrix.manylinux || '' }}
8383
- name: Upload wheels
8484
if: ${{ inputs.upload-artifacts }}
85-
uses: actions/upload-artifact@v6
85+
uses: actions/upload-artifact@v7
8686
with:
8787
name: wheels-${{ matrix.os }}-${{ matrix.target }}
8888
path: tpchgen-cli/dist
@@ -99,7 +99,7 @@ jobs:
9999
working-directory: tpchgen-cli
100100
- name: Upload sdist
101101
if: ${{ inputs.upload-artifacts }}
102-
uses: actions/upload-artifact@v6
102+
uses: actions/upload-artifact@v7
103103
with:
104104
name: wheels-sdist
105105
path: tpchgen-cli/dist

.github/workflows/ci_typos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
steps:
4040
- uses: actions/checkout@v6
4141
- name: Check typos
42-
uses: crate-ci/typos@v1.42.1
42+
uses: crate-ci/typos@v1.44.0

.github/workflows/tpcdsgen-conformance.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Upload test fixtures as artifacts
6565
if: failure() # Upload fixtures if tests fail for debugging
66-
uses: actions/upload-artifact@v6
66+
uses: actions/upload-artifact@v7
6767
with:
6868
name: test-fixtures
6969
path: tpcdsgen/tests/fixtures/
@@ -107,7 +107,7 @@ jobs:
107107
time ./target/release/tpcdsgen --scale 1 --directory /tmp/bench
108108
109109
- name: Upload benchmark results
110-
uses: actions/upload-artifact@v6
110+
uses: actions/upload-artifact@v7
111111
with:
112112
name: benchmark-results
113113
path: /tmp/bench/

.github/workflows/tpchgen-cli-publish-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
attestations: write # Used to generate artifact attestation
2525
steps:
2626
- name: Download all build artifacts
27-
uses: actions/download-artifact@v7
27+
uses: actions/download-artifact@v8
2828
with:
2929
pattern: '*'
3030
merge-multiple: true
@@ -37,7 +37,7 @@ jobs:
3737
run: python -m twine check --strict dist/*
3838

3939
- name: Generate artifact attestation
40-
uses: actions/attest-build-provenance@v3
40+
uses: actions/attest-build-provenance@v4
4141
with:
4242
subject-path: 'dist/*'
4343

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ repository = "https://github.com/clflushopt/tpchgen-rs"
1414
version = "2.0.2"
1515

1616
[profile.release]
17+
codegen-units = 1
18+
lto = true
1719
strip = "debuginfo"

tpchgen-arrow/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ readme = "README.md"
99
license = "Apache-2.0"
1010

1111
[dependencies]
12-
arrow = { version = "57.1", default-features = false, features = ["prettyprint"] }
12+
arrow = { version = "58", default-features = false, features = ["prettyprint"] }
1313
tpchgen = { path = "../tpchgen", version = "2.0.2" }
1414

1515
[dev-dependencies]
16-
arrow-csv = "57.1"
16+
arrow-csv = "58"
1717
chrono = "0.4.39"

tpchgen-cli/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ name = "tpchgen-cli"
1818
path = "bin/main.rs"
1919

2020
[dependencies]
21-
arrow = "57.1"
22-
parquet = "57.1"
21+
arrow = "58"
22+
parquet = "58"
2323
clap = { version = "4.5.32", features = ["derive"] }
24-
tpchgen = { path = "../tpchgen", version = "2.0.2"}
24+
tpchgen = { path = "../tpchgen", version = "2.0.2" }
2525
tpchgen-arrow = { path = "../tpchgen-arrow", version = "2.0.2" }
26-
tokio = { version = "1.44.1", features = ["full"]}
26+
tokio = { version = "1.44.1", features = ["full"] }
2727
futures = "0.3.31"
2828
num_cpus = "1.0"
2929
log = "0.4.26"

tpchgen-cli/tests/cli_integration.rs

Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use assert_cmd::Command;
1+
use assert_cmd::cargo::cargo_bin_cmd;
22
use parquet::arrow::arrow_reader::{ArrowReaderOptions, ParquetRecordBatchReaderBuilder};
33
use parquet::file::metadata::ParquetMetaDataReader;
44
use std::fs;
@@ -16,8 +16,7 @@ fn test_tpchgen_cli_tbl_scale_factor_0_001() {
1616
let temp_dir = tempdir().expect("Failed to create temporary directory");
1717

1818
// Run the tpchgen-cli command
19-
Command::cargo_bin("tpchgen-cli")
20-
.expect("Binary not found")
19+
cargo_bin_cmd!("tpchgen-cli")
2120
.arg("--scale-factor")
2221
.arg("0.001")
2322
.arg("--output-dir")
@@ -73,8 +72,7 @@ fn test_tpchgen_cli_tbl_no_overwrite() {
7372
let expected_file = temp_dir.path().join("part.tbl");
7473

7574
// First run - create the file
76-
Command::cargo_bin("tpchgen-cli")
77-
.expect("Binary not found")
75+
cargo_bin_cmd!("tpchgen-cli")
7876
.arg("--scale-factor")
7977
.arg("0.001")
8078
.arg("--tables")
@@ -90,8 +88,7 @@ fn test_tpchgen_cli_tbl_no_overwrite() {
9088

9189
// Run the tpchgen-cli command again with the same parameters and expect the
9290
// file to not be overwritten and a warning to be logged
93-
let output = Command::cargo_bin("tpchgen-cli")
94-
.expect("Binary not found")
91+
let output = cargo_bin_cmd!("tpchgen-cli")
9592
.arg("--scale-factor")
9693
.arg("0.001")
9794
.arg("--tables")
@@ -128,8 +125,7 @@ fn test_tpchgen_cli_parquet_no_overwrite() {
128125
let expected_file = temp_dir.path().join("part.parquet");
129126

130127
// First run - create the file
131-
Command::cargo_bin("tpchgen-cli")
132-
.expect("Binary not found")
128+
cargo_bin_cmd!("tpchgen-cli")
133129
.arg("parquet")
134130
.arg("--scale-factor")
135131
.arg("0.001")
@@ -146,8 +142,7 @@ fn test_tpchgen_cli_parquet_no_overwrite() {
146142

147143
// Run the tpchgen-cli command again with the same parameters and expect the
148144
// file to not be overwritten and a warning to be logged
149-
let output = Command::cargo_bin("tpchgen-cli")
150-
.expect("Binary not found")
145+
let output = cargo_bin_cmd!("tpchgen-cli")
151146
.arg("parquet")
152147
.arg("--scale-factor")
153148
.arg("0.001")
@@ -185,8 +180,7 @@ fn test_tpchgen_cli_quiet_flag() {
185180
let expected_file = temp_dir.path().join("part.tbl");
186181

187182
// First run - create the file
188-
Command::cargo_bin("tpchgen-cli")
189-
.expect("Binary not found")
183+
cargo_bin_cmd!("tpchgen-cli")
190184
.arg("--scale-factor")
191185
.arg("0.001")
192186
.arg("--tables")
@@ -202,8 +196,7 @@ fn test_tpchgen_cli_quiet_flag() {
202196

203197
// Run the tpchgen-cli command again with --quiet flag
204198
// Expect the file to not be overwritten and NO warning even though warnings show by default
205-
let output = Command::cargo_bin("tpchgen-cli")
206-
.expect("Binary not found")
199+
let output = cargo_bin_cmd!("tpchgen-cli")
207200
.arg("--scale-factor")
208201
.arg("0.001")
209202
.arg("--tables")
@@ -245,8 +238,7 @@ fn test_tpchgen_cli_parts() {
245238

246239
let num_parts = 4;
247240
let output_dir = temp_dir.path().to_path_buf();
248-
Command::cargo_bin("tpchgen-cli")
249-
.expect("Binary not found")
241+
cargo_bin_cmd!("tpchgen-cli")
250242
.arg("--scale-factor")
251243
.arg("0.001")
252244
.arg("--output-dir")
@@ -276,8 +268,7 @@ fn test_tpchgen_cli_parts_explicit() {
276268
threads.push(std::thread::spawn(move || {
277269
// Run the tpchgen-cli command for each part
278270
// output goes into `output_dir/orders/orders.{part}.tbl`
279-
Command::cargo_bin("tpchgen-cli")
280-
.expect("Binary not found")
271+
cargo_bin_cmd!("tpchgen-cli")
281272
.arg("--scale-factor")
282273
.arg("0.001")
283274
.arg("--output-dir")
@@ -306,8 +297,7 @@ fn test_tpchgen_cli_parts_all_tables() {
306297

307298
let num_parts = 8;
308299
let output_dir = temp_dir.path().to_path_buf();
309-
Command::cargo_bin("tpchgen-cli")
310-
.expect("Binary not found")
300+
cargo_bin_cmd!("tpchgen-cli")
311301
.arg("--scale-factor")
312302
.arg("0.001")
313303
.arg("--output-dir")
@@ -358,8 +348,7 @@ async fn test_write_parquet_orders() {
358348
// Run the CLI command to generate parquet data
359349
let output_dir = tempdir().unwrap();
360350
let output_path = output_dir.path().join("orders.parquet");
361-
Command::cargo_bin("tpchgen-cli")
362-
.expect("Binary not found")
351+
cargo_bin_cmd!("tpchgen-cli")
363352
.arg("parquet")
364353
.arg("--tables")
365354
.arg("orders")
@@ -403,8 +392,7 @@ async fn test_write_parquet_orders() {
403392
async fn test_write_parquet_row_group_size_default() {
404393
// Run the CLI command to generate parquet data with default settings
405394
let output_dir = tempdir().unwrap();
406-
Command::cargo_bin("tpchgen-cli")
407-
.expect("Binary not found")
395+
cargo_bin_cmd!("tpchgen-cli")
408396
.arg("parquet")
409397
.arg("--scale-factor")
410398
.arg("1")
@@ -470,8 +458,7 @@ async fn test_write_parquet_row_group_size_default() {
470458
async fn test_write_parquet_row_group_size_20mb() {
471459
// Run the CLI command to generate parquet data with larger row group size
472460
let output_dir = tempdir().unwrap();
473-
Command::cargo_bin("tpchgen-cli")
474-
.expect("Binary not found")
461+
cargo_bin_cmd!("tpchgen-cli")
475462
.arg("parquet")
476463
.arg("--scale-factor")
477464
.arg("1")
@@ -530,8 +517,7 @@ fn test_tpchgen_cli_part_no_parts() {
530517
let temp_dir = tempdir().expect("Failed to create temporary directory");
531518

532519
// CLI Error test --part and but not --parts
533-
Command::cargo_bin("tpchgen-cli")
534-
.expect("Binary not found")
520+
cargo_bin_cmd!("tpchgen-cli")
535521
.arg("--output-dir")
536522
.arg(temp_dir.path())
537523
.arg("--part")
@@ -548,8 +534,7 @@ fn test_tpchgen_cli_too_many_parts() {
548534
let temp_dir = tempdir().expect("Failed to create temporary directory");
549535

550536
// This should fail because --part is 42 which is more than the --parts 10
551-
Command::cargo_bin("tpchgen-cli")
552-
.expect("Binary not found")
537+
cargo_bin_cmd!("tpchgen-cli")
553538
.arg("--output-dir")
554539
.arg(temp_dir.path())
555540
.arg("--part")
@@ -567,8 +552,7 @@ fn test_tpchgen_cli_too_many_parts() {
567552
fn test_tpchgen_cli_zero_part() {
568553
let temp_dir = tempdir().expect("Failed to create temporary directory");
569554

570-
Command::cargo_bin("tpchgen-cli")
571-
.expect("Binary not found")
555+
cargo_bin_cmd!("tpchgen-cli")
572556
.arg("--output-dir")
573557
.arg(temp_dir.path())
574558
.arg("--part")
@@ -585,8 +569,7 @@ fn test_tpchgen_cli_zero_part() {
585569
fn test_tpchgen_cli_zero_part_zero_parts() {
586570
let temp_dir = tempdir().expect("Failed to create temporary directory");
587571

588-
Command::cargo_bin("tpchgen-cli")
589-
.expect("Binary not found")
572+
cargo_bin_cmd!("tpchgen-cli")
590573
.arg("--output-dir")
591574
.arg(temp_dir.path())
592575
.arg("--part")
@@ -604,8 +587,7 @@ fn test_tpchgen_cli_zero_part_zero_parts() {
604587
#[tokio::test]
605588
async fn test_incompatible_options_warnings() {
606589
let output_dir = tempdir().unwrap();
607-
Command::cargo_bin("tpchgen-cli")
608-
.expect("Binary not found")
590+
cargo_bin_cmd!("tpchgen-cli")
609591
.arg("--format")
610592
.arg("csv")
611593
.arg("--tables")
@@ -634,8 +616,7 @@ async fn test_incompatible_options_warnings() {
634616
#[tokio::test]
635617
async fn test_quiet_flag_suppresses_warnings() {
636618
let output_dir = tempdir().unwrap();
637-
let output = Command::cargo_bin("tpchgen-cli")
638-
.expect("Binary not found")
619+
let output = cargo_bin_cmd!("tpchgen-cli")
639620
.env("RUST_LOG", "warn")
640621
.arg("--format")
641622
.arg("csv")

0 commit comments

Comments
 (0)