Skip to content

chore: Add tbl/csv subcommands, deprecate --format flag#255

Merged
kevinjqliu merged 23 commits into
clflushopt:mainfrom
kevinjqliu:kevinjqliu/cli-csv-tbl
May 11, 2026
Merged

chore: Add tbl/csv subcommands, deprecate --format flag#255
kevinjqliu merged 23 commits into
clflushopt:mainfrom
kevinjqliu:kevinjqliu/cli-csv-tbl

Conversation

@kevinjqliu
Copy link
Copy Markdown
Collaborator

@kevinjqliu kevinjqliu commented May 10, 2026

Follow-up to #254.
Closes #173.

Adds tbl and csv subcommands alongside the existing parquet subcommand so every output format is a first-class subcommand. The top-level --format, --parquet-compression, and --parquet-row-group-bytes flags are deprecated (removal in v4.0.0).

Note that the default behavior remains unchanged. Running without --format and without a subcommand (e.g. tpchgen-cli -s 10) still defaults to TBL output, preserving backward compatibility.

Changes

New subcommands

Deprecated flags (hidden from --help, warn on use, removed in v4.0.0)

  • --format — use tbl, csv, or parquet subcommand instead
  • --parquet-compression — use parquet --compression=...
  • --parquet-row-group-bytes — use parquet --row-group-bytes=...
  • --delimiter at top level — removed, move to csv subcommand; use tpchgen-cli csv --delimiter=... instead (we never released with --delimiter, so not a breaking change)

Bug fix

  • Mixing top-level args with a subcommand (e.g. tpchgen-cli -s 10 parquet) now errors instead of silently ignoring the top-level args (args_conflicts_with_subcommands)

  • csv --delimiter rejects non-ASCII characters at parse time (e.g. --delimiter='€') instead of failing mid-generation, since the underlying arrow-csv writer requires an ASCII byte

kevinjqliu and others added 5 commits May 10, 2026 10:47
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@kevinjqliu kevinjqliu force-pushed the kevinjqliu/cli-csv-tbl branch from 09166c0 to d9f54c1 Compare May 10, 2026 17:48
kevinjqliu and others added 7 commits May 10, 2026 12:46
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@kevinjqliu
Copy link
Copy Markdown
Collaborator Author

i thoroughly tested all the commands listed in this repo and all the error cases.

all commands ran successfully locally
all error cases are covered by integration tests

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown
Owner

@clflushopt clflushopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple on questions on how some args are unwraped prior to being checked via is_some() I think we should align that logic.

Comment thread tpchgen-cli/bin/main.rs Outdated
Comment thread tpchgen-cli/bin/main.rs Outdated
kevinjqliu and others added 9 commits May 10, 2026 15:21
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Comment thread tpchgen-cli/bin/main.rs
Comment thread tpchgen-cli/bin/main.rs
@kevinjqliu
Copy link
Copy Markdown
Collaborator Author

@clflushopt im pretty happy with these changes, lmk if you have any other feedback!

@kevinjqliu kevinjqliu merged commit 81b3c9b into clflushopt:main May 11, 2026
25 checks passed
@kevinjqliu kevinjqliu deleted the kevinjqliu/cli-csv-tbl branch May 11, 2026 16:40
@kevinjqliu
Copy link
Copy Markdown
Collaborator Author

moving this forward, will fix forward if anything comes up 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate using clap subcommands to validate CLI arguments

2 participants