sdf-jkl commented on code in PR #12271:
URL: https://github.com/apache/arrow-rs/pull/12271#discussion_r4684795762
##########
arrow-schema/src/extension/canonical/json.rs:
##########
@@ -31,6 +31,17 @@ use crate::{ArrowError, DataType, extension::ExtensionType};
#[derive(Debug, Clone, Default, PartialEq)]
pub struct Json(JsonMetadata);
+impl Json {
+ fn validate_impl(data_type: &DataType) -> Result<(), ArrowError> {
Review Comment:
I don't think json and WKB need a separate `validate_impl` and validation
can stay in `supports_data_type`
##########
arrow-schema/src/extension/canonical/fixed_shape_tensor.rs:
##########
@@ -90,6 +90,28 @@ impl FixedShapeTensor {
})
}
+ fn validate_impl<'a>(
Review Comment:
Couldn't wrap my head around adding `validate_impl` instead of keeping
everything in `supports_datatype` or `validate`.
Then I remembered that it was a pain to deal with the tensor types because
they essentially require building the whole thing for the validation.
it makes sense to have a separate `validate_impl` that would return the
actual type built 👍
--
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]