Skip to content

Conversation

Weijun-H
Copy link
Member

@Weijun-H Weijun-H commented Oct 1, 2025

Which issue does this PR close?

Rationale for this change

Support more human readable display in Union

What changes are included in this PR?

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 1, 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.

Thanks @Weijun-H -- this looks like a nice improvement to me

FYI @emilk

@Weijun-H Weijun-H changed the title refactor: improve display formatting for Struct refactor: improve display formatting for Union Oct 2, 2025
format!("{type_id:?}: {maybe_nullable}{data_type}{metadata_str}")
})
.collect::<Vec<_>>()
.join(", ");
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to use ; as a separator ?
This way the , used to separate the metadata won't confuse the readers.

Copy link
Member Author

Choose a reason for hiding this comment

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

nice catch

Copy link
Member Author

Choose a reason for hiding this comment

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

After some investigation, I think we should continue using commas to separate different fields, following the DuckDB SQL style. For metadata, since it is displayed with brackets, it should not be too confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants