Fix cargo fmt for parquet modules - #11016
Open
sdf-jkl wants to merge 1 commit into
Open
Conversation
sdf-jkl
marked this pull request as ready for review
September 8, 2026 03:25
Member
Author
|
@Jefffrey @Rich-T-kid PTAL |
Rich-T-kid
reviewed
Sep 8, 2026
Rich-T-kid
left a comment
Contributor
There was a problem hiding this comment.
looks good, a bit confused about the repeated mod declarations though.
Comment on lines
-162
to
-168
| Note that currently the above will not check all source files in the parquet crate. To check all | ||
| parquet files run the following from the top-level `arrow-rs` directory: | ||
|
|
||
| ```bash | ||
| cargo fmt -p parquet -- --check --config skip_children=true `find ./parquet -name "*.rs" \! -name format.rs` | ||
| ``` | ||
|
|
Comment on lines
+25
to
+29
| #[cfg(feature = "experimental")] | ||
| #[doc(hidden)] | ||
| pub mod rle; | ||
| #[cfg(not(feature = "experimental"))] | ||
| pub(crate) mod rle; |
Jefffrey
approved these changes
Sep 8, 2026
Jefffrey
left a comment
Contributor
There was a problem hiding this comment.
makes sense, we're just inlining the macros 👍
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.
Which issue does this PR close?
cargo fmtdoesn't properly work on parquet crate #6897.Rationale for this change
rustfmt does not discover out-of-line modules declared inside macros (rust-lang/rustfmt#3253). The experimental module macro therefore causes cargo fmt to skip several Parquet module trees.
This uses the same approach as delta-io/delta-kernel-rs#935.
What changes are included in this PR?
Are these changes tested?
A full cargo test -p parquet --lib run compiled successfully and passed 1,278 tests; 93 fixture-dependent tests could not run because the local checkout does not have the testing and parquet-testing data submodules initialized.
Are there any user-facing changes?
Contributors can now format all Parquet sources with the standard cargo fmt --all command. There are no public API changes.
AI usage
OpenAI Codex was used to investigate the rustfmt behavior, implement the feature-gated module declarations, update CI and contributor documentation, and run the validation commands reported above. The resulting code and PR description were AI-assisted.