alamb commented on code in PR #9677:
URL: https://github.com/apache/arrow-rs/pull/9677#discussion_r3075098980


##########
arrow-schema/src/extension/mod.rs:
##########
@@ -257,6 +257,15 @@ pub trait ExtensionType: Sized {
     /// this extension type.
     fn try_new(data_type: &DataType, metadata: Self::Metadata) -> Result<Self, 
ArrowError>;
 
+    /// Validate this extension type for a field with the given data type and
+    /// metadata.
+    ///
+    /// The default implementation delegates to [`Self::try_new`]. Extension
+    /// types may override this to validate without constructing `Self`.
+    fn validate(data_type: &DataType, metadata: Self::Metadata) -> Result<(), 
ArrowError> {
+        Self::try_new(data_type, metadata).map(|_| ())

Review Comment:
   How about as a follow on we remove the default impl (and we merge it for the 
next major breaking API release)-- that will force any implementations to 
implement and avoid the potential slowdown



-- 
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]

Reply via email to