diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index b574ce7f92c2..dd09ff2f60bc 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -1,5 +1,3 @@ -use std::sync::Arc; - use crate::{ result::_Backtrace, DeserializationResult, ResultExt as _, SerializationResult, SizeBytes, }; @@ -41,21 +39,6 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { where Self: 'a; - // --- Optional metadata methods --- - - /// The underlying [`arrow2::datatypes::DataType`], including datatype extensions. - /// - /// The default implementation will simply wrap [`Self::arrow_datatype`] in an extension called - /// [`Self::name`], which is what you want in most cases. - #[inline] - fn extended_arrow_datatype() -> arrow2::datatypes::DataType { - arrow2::datatypes::DataType::Extension( - Self::name().to_string(), - Arc::new(Self::arrow_datatype()), - None, - ) - } - // --- Optional serialization methods --- /// Given an iterator of owned or reference values to the current [`Loggable`], serializes diff --git a/crates/store/re_types_core/src/tuid.rs b/crates/store/re_types_core/src/tuid.rs index 917393853d1a..153f73110817 100644 --- a/crates/store/re_types_core/src/tuid.rs +++ b/crates/store/re_types_core/src/tuid.rs @@ -64,8 +64,14 @@ impl Loggable for Tuid { ]; let validity = None; + let datatype = arrow2::datatypes::DataType::Extension( + Self::name().to_string(), + Arc::new(Self::arrow_datatype()), + None, + ); + // TODO(cmc): We use the extended type here because we rely on it for formatting. - Ok(StructArray::new(Self::extended_arrow_datatype(), values, validity).boxed()) + Ok(StructArray::new(datatype, values, validity).boxed()) } fn from_arrow(array: &dyn ::arrow2::array::Array) -> crate::DeserializationResult> {