fix: serialize listing table without partition column#15737
Merged
alamb merged 4 commits intoapache:mainfrom Apr 17, 2025
Merged
fix: serialize listing table without partition column#15737alamb merged 4 commits intoapache:mainfrom
alamb merged 4 commits intoapache:mainfrom
Conversation
Contributor
|
Thanks @chenkovsky i think changes make sense, very clean implementation |
milenkovicm
approved these changes
Apr 17, 2025
alamb
approved these changes
Apr 17, 2025
Contributor
alamb
left a comment
There was a problem hiding this comment.
Thanks @chenkovsky and @milenkovicm . I have one suggestion for your consideration, but I think this is better than what is on main
Comment on lines
465
to
471
| let arrow_type = | ||
| col.arrow_type.as_ref().unwrap().try_into().map_err(|e| { | ||
| proto_error(format!( | ||
| "Received an unknown ArrowType: {}", | ||
| e | ||
| )) | ||
| })?; |
Contributor
There was a problem hiding this comment.
I think it would be good to avoid an unwrap here as that will panic rather than returning an error on invalid protobuf
Suggested change
| let arrow_type = | |
| col.arrow_type.as_ref().unwrap().try_into().map_err(|e| { | |
| proto_error(format!( | |
| "Received an unknown ArrowType: {}", | |
| e | |
| )) | |
| })?; | |
| let Some(arrow_type) = col.arrow_type.as_ref() else { | |
| return Err(proto_error(format!( | |
| "Missing Arrow type in partition columns" | |
| ))); | |
| }; | |
| let arrow_type = DataType::try_from(arrow_type).map_err(|e| { | |
| proto_error(format!("Received an unknown ArrowType: {}", e)) | |
| })?; |
Contributor
|
Thanks again @chenkovsky |
nirnayroy
pushed a commit
to nirnayroy/datafusion
that referenced
this pull request
May 2, 2025
* fix: serialize listing table without partition column * remove unwrap * format * clippy
This was referenced Oct 4, 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?
ListingTableread fails after logical plan ser/de #15718.Rationale for this change
partition columns should exclude file schema in listing table
What changes are included in this PR?
Are these changes tested?
UT
Are there any user-facing changes?
No