mbrobbel commented on code in PR #7497:
URL: https://github.com/apache/arrow-rs/pull/7497#discussion_r2086981702
##########
arrow-schema/src/field.rs:
##########
@@ -351,7 +384,7 @@ impl Field {
/// assert_eq!(field.data_type(), &DataType::Utf8);
/// ```
pub fn with_data_type(mut self, data_type: DataType) -> Self {
- self.data_type = data_type;
+ self.set_data_type(data_type);
Review Comment:
I missed this when adding extension type methods, but perhaps we should
check if a field has extension type information when updating the data type,
and if it does, drop the extension type (because we can't validate that the new
data type is supported).
--
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]