Repository navigation
GH-3289: Test read commands through CLI arguments - #3858
Open
zhangxinyao88 wants to merge 2 commits into
Open
zhangxinyao88 wants to merge 2 commits into
zhangxinyao88 wants to merge 2 commits into
Conversation
divjotarora
approved these changes
Oct 15, 2026
divjotarora
left a comment
Contributor
There was a problem hiding this comment.
Thanks @zhangxinyao88!
| .named("unused") | ||
| .named("record"); | ||
| SimpleGroupFactory groups = new SimpleGroupFactory(schema); | ||
| try (ParquetWriter<Group> writer = ExampleParquetWriter.builder(new org.apache.hadoop.fs.Path(path.toUri())) |
Contributor
There was a problem hiding this comment.
[nit] Add an import for org.apache.hadoop.fs.Path?
Contributor
Author
There was a problem hiding this comment.
[nit] Add an import for
org.apache.hadoop.fs.Path?
Added the Hadoop Path import in d943e37.
Contributor
There was a problem hiding this comment.
Hey @zhangxinyao88, I missed the fact that the test also needs java.nio.file.Path and this one is used multiple times while org.apache.hadoop.fs.Path is only used once. I would actually recommend reverting the change back to importing java.nio.file.Path and using org.apache.hadoop.fs.Path fully-qualified because of this. Sorry for the churn!
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Continue #3289 with CLI coverage for
head,cat, andscan. Existing command tests mostly set fields directly and check return codes, leaving argument parsing and observable results untested.What changes are included in this PR?
Add six tests using the existing CLI helper and deterministic Parquet files:
headdefaults to ten records and honors--num-records.catprints all records and honors--columns.scancounts records across multiple input files and rejects a missing column.Record output is parsed and compared by field and value. Scan assertions check counts and the missing-field diagnostic without depending on elapsed time or complete log output.
Are these changes tested?
./mvnw -B -ntp -pl parquet-cli spotless:check test: 87 passed, 2 skipped, including all six new tests. Spotless and license checks passed.Are there any user-facing changes?
No. Tests only.