alamb commented on code in PR #8350:
URL: https://github.com/apache/arrow-rs/pull/8350#discussion_r2358418397
##########
arrow-schema/src/field.rs:
##########
@@ -391,6 +398,49 @@ impl Field {
/// ```
pub fn with_data_type(mut self, data_type: DataType) -> Self {
self.set_data_type(data_type);
+ self.without_extension_type()
Review Comment:
I think clear documentation warnings are best because (as @mbrobbel says)
you don't know what combination is valid without the actual extension type.
Perhaps we can also add some examples of "how to change datatype and still
validate extension types" or something to make it easier for downstream users
to verify the expected extension types are still valid after modification
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]