-
Notifications
You must be signed in to change notification settings - Fork 1k
refactor: improve display formatting for Union #8529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format!("{type_id:?}: {maybe_nullable}{data_type}{metadata_str}") | ||
}) | ||
.collect::<Vec<_>>() | ||
.join(", "); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again @Weijun-H
Which issue does this PR close?
Display
forDataType
#8351Rationale 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