Skip to content

Conversation

@emilk
Copy link
Contributor

@emilk emilk commented Sep 23, 2025

Rationale for this change

Despite us having Display implementations for DataType, a lot of error messages still use Debug. See for instance:

Therefor I want to make sure the Debug formatting of Field (and, by extension, DataType) is not utterly horrible. This PR makes things… slightly better.

What changes are included in this PR?

Omits fields of Field that have their "default" values.

Are these changes tested?

Yes, there are new tests.

Are there any user-facing changes?

Though this changes the Debug formatting, I would NOT consider this a breaking change, because nobody should rely on consistent Debug formatting. See for instance https://doc.rust-lang.org/std/fmt/trait.Debug.html#stability

@github-actions github-actions bot added the arrow Changes to the arrow crate label Sep 23, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @emilk -- I think this looks great


let mut s = f.debug_struct("Field");

if name != "item" {
Copy link
Contributor

Choose a reason for hiding this comment

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

this makes sense not to print the "standard" item naame

@alamb alamb added the api-change Changes to the arrow API label Sep 23, 2025
@alamb
Copy link
Contributor

alamb commented Sep 23, 2025

I am marking it as "api change" so it shows up in the release notes, and since we are going to do a major release next anyways (that can have breaking changes) this looks good to me

@alamb alamb merged commit fc1ef41 into apache:main Sep 24, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change Changes to the arrow API arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants