feat: parse DataType::Union, DataType::Map, DataType::RunEndEncoded - #8765
Merged
Conversation
dqkqd
force-pushed
the
push-vqxxlxoyqypm
branch
from
November 2, 2025 00:39
89d1c7a to
d2abdcd
Compare
dqkqd
force-pushed
the
push-vqxxlxoyqypm
branch
from
November 2, 2025 00:54
d2abdcd to
9dd7967
Compare
DataType::UnionDataType::Union, DataType::Map, DataType::RunEndEncoded
dqkqd
force-pushed
the
push-vqxxlxoyqypm
branch
from
November 2, 2025 01:04
9dd7967 to
77bafb5
Compare
dqkqd
commented
Nov 2, 2025
| /// E.g: "a": nullable Int64 | ||
| /// | ||
| /// TODO: support metadata: `"a": nullable Int64 metadata: {"foo": "value"}` | ||
| fn parse_field(&mut self) -> ArrowResult<Field> { |
Contributor
Author
There was a problem hiding this comment.
There are parse_field and parse_list_field because we have two representation for Field:
- In
Struct,Union,Map,RunEndEncoded:"a": nullable Int64 - In
Listtypes:nullable Int64, field: 'a'
I don't think having two different representation for Field is a wise choice,
but I don't change it in this PR.
Contributor
There was a problem hiding this comment.
Maybe we can file a follow on ticket to unify them
dqkqd
marked this pull request as ready for review
November 2, 2025 02:17
dqkqd
marked this pull request as draft
November 2, 2025 02:20
dqkqd
commented
Nov 2, 2025
| write!(f, "Union({union_mode:?}, ")?; | ||
| write!(f, "Union({union_mode:?}")?; | ||
| if !union_fields.is_empty() { | ||
| write!(f, ", ")?; |
Contributor
Author
There was a problem hiding this comment.
Allow empty union to be displayed like Union(Dense), instead of Union(Dense, )
dqkqd
marked this pull request as ready for review
November 2, 2025 03:44
Contributor
This was referenced Nov 19, 2025
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?
parse_data_typeforList,ListView,LargeList,LargeListView,FixedSizeList,Union,Map,RunEndCoded. #8648Rationale for this change
Parse
DataType::Union,DataType::MapandDataType::RunEndEncoded.What changes are included in this PR?
parse_union,parse_map, andparse_run_encoded.parse_list_field_name->parse_list_fieldto remove duplicated codes.Are these changes tested?
Yes, new test added.
Are there any user-facing changes?
Yes. Relate to #8351