Skip to content

GH-3289: Test CSV commands through CLI arguments - #3860

Open
zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/parquet-3289-csv-cli-tests
Open

zhangxinyao88 wants to merge 1 commit into
apache:masterfrom
zhangxinyao88:codex/parquet-3289-csv-cli-tests

Conversation

@zhangxinyao88

Copy link
Copy Markdown
Contributor

Rationale for this change

Continue #3289 with CLI coverage for csv-schema and convert-csv. Existing command tests assign fields directly and mostly check return codes or file existence, leaving parsed arguments and resulting schemas/data untested.

What changes are included in this PR?

Add nine cases using the existing CLI helper and small deterministic CSV files:

  • Schema inference checks record names, nullable types, generated names without a header, and an output schema with a supplied header, delimiter, skipped preamble and required field.
  • Conversion reads back all records, checks required-field metadata, and verifies that an explicit string schema overrides numeric inference.
  • Multi-file conversion checks record order and an explicitly selected compression codec.
  • Overwrite cases verify that existing bytes are preserved without the flag and replaced by readable Parquet with it.

Inputs, schema files and output paths include spaces. Assertions use parsed schemas, record values and footer metadata without help-text snapshots. Existing read/inspection coverage in #3858 and #3859 is separate.

Are these changes tested?

./mvnw -o -B -ntp -pl parquet-cli spotless:check test: 92 cases, 90 passed, 2 skipped, no failures/errors. All nine new cases passed; Spotless and RAT license checks passed. Java 17 and existing cached dependencies were used; no full-reactor or multi-JDK build was run.

Eight temporary local regression controls triggered assertion failures when required/no-header/output/schema/codec/multi-input/overwrite behavior was ignored or forced. All production edits were restored before the successful full-module run.

Are there any user-facing changes?

No. Tests only.

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.

1 participant