-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: serialize listing table without partition column #15737
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
Thanks @chenkovsky i think changes make sense, very clean implementation |
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 @chenkovsky and @milenkovicm . I have one suggestion for your consideration, but I think this is better than what is on main
let arrow_type = | ||
col.arrow_type.as_ref().unwrap().try_into().map_err(|e| { | ||
proto_error(format!( | ||
"Received an unknown ArrowType: {}", | ||
e | ||
)) | ||
})?; |
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.
I think it would be good to avoid an unwrap here as that will panic rather than returning an error on invalid protobuf
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)) | |
})?; |
Thanks again @chenkovsky |
* fix: serialize listing table without partition column * remove unwrap * format * clippy
Which issue does this PR close?
ListingTable
read 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