diff --git a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs index b8d1f56fdf8d..2b942ca13f19 100644 --- a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs @@ -572,7 +572,7 @@ fn quote_arrow_field_deserializer( objects, datatype, IteratorKind::ResultOptionValue, - quote!(::re_types_core::ArrowString).into(), + quote!(::re_types_core::ArrowString::from).into(), ); let data_src_buf = format_ident!("{data_src}_buf"); diff --git a/crates/build/re_types_builder/src/codegen/rust/serializer.rs b/crates/build/re_types_builder/src/codegen/rust/serializer.rs index 7dcec6703b64..8f8063923dc4 100644 --- a/crates/build/re_types_builder/src/codegen/rust/serializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/serializer.rs @@ -606,7 +606,7 @@ fn quote_arrow_field_serializer( ( quote! { .flat_map(|datum| { - datum.#quoted_member_accessor.0 + datum.#quoted_member_accessor.into_arrow2_buffer() }) }, quote! { @@ -618,7 +618,7 @@ fn quote_arrow_field_serializer( } else { ( quote! { - .flat_map(|s| s.0) + .flat_map(|s| s.into_arrow2_buffer()) }, quote! { .map(|datum| datum.len()) diff --git a/crates/store/re_chunk/src/iter.rs b/crates/store/re_chunk/src/iter.rs index 6db52257b169..571c5995c48b 100644 --- a/crates/store/re_chunk/src/iter.rs +++ b/crates/store/re_chunk/src/iter.rs @@ -456,7 +456,7 @@ impl Chunk { let offsets = &offsets.as_slice()[idx..idx + len]; let lengths = &lengths.as_slice()[idx..idx + len]; izip!(offsets, lengths) - .map(|(&idx, &len)| ArrowString(values.clone().sliced(idx as _, len))) + .map(|(&idx, &len)| ArrowString::from(values.clone().sliced(idx as _, len))) .collect_vec() }), ) diff --git a/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs b/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs index c682fea591ea..300720dffec5 100644 --- a/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs +++ b/crates/store/re_types/src/blueprint/datatypes/component_column_selector.rs @@ -107,7 +107,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { let inner_data: arrow::buffer::Buffer = entity_path .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -140,7 +140,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { let inner_data: arrow::buffer::Buffer = component .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] @@ -233,7 +233,9 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { - crate::datatypes::EntityPath(::re_types_core::ArrowString(v)) + crate::datatypes::EntityPath( + ::re_types_core::ArrowString::from(v), + ) }) }) }) @@ -292,7 +294,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { - crate::datatypes::Utf8(::re_types_core::ArrowString(v)) + crate::datatypes::Utf8(::re_types_core::ArrowString::from(v)) }) }) }) diff --git a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs index 8add6c0fc09b..02bead6bfb67 100644 --- a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for SelectedColumns { ); let inner_data: arrow::buffer::Buffer = time_columns_inner_data .into_iter() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -295,7 +295,7 @@ impl ::re_types_core::Loggable for SelectedColumns { .map(|res_or_opt| { res_or_opt .map(|v| crate::datatypes::Utf8( - ::re_types_core::ArrowString(v), + ::re_types_core::ArrowString::from(v), )) }) }) diff --git a/crates/store/re_types/src/datatypes/annotation_info.rs b/crates/store/re_types/src/datatypes/annotation_info.rs index 3ed9d719b83d..4c8e1d32667e 100644 --- a/crates/store/re_types/src/datatypes/annotation_info.rs +++ b/crates/store/re_types/src/datatypes/annotation_info.rs @@ -121,7 +121,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let inner_data: arrow::buffer::Buffer = label .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -255,7 +255,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { - crate::datatypes::Utf8(::re_types_core::ArrowString(v)) + crate::datatypes::Utf8(::re_types_core::ArrowString::from(v)) }) }) }) diff --git a/crates/store/re_types/src/datatypes/tensor_dimension.rs b/crates/store/re_types/src/datatypes/tensor_dimension.rs index d1d6f4bdf6fb..4fce89954ca5 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension.rs @@ -109,8 +109,11 @@ impl ::re_types_core::Loggable for TensorDimension { arrow::buffer::OffsetBuffer::::from_lengths(name.iter().map( |opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default(), )); - let inner_data: arrow::buffer::Buffer = - name.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = name + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { StringArray::new_unchecked(offsets, inner_data, name_validity) @@ -219,7 +222,7 @@ impl ::re_types_core::Loggable for TensorDimension { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() diff --git a/crates/store/re_types/src/datatypes/utf8pair.rs b/crates/store/re_types/src/datatypes/utf8pair.rs index 3b0456cb5e07..99739ab10aa1 100644 --- a/crates/store/re_types/src/datatypes/utf8pair.rs +++ b/crates/store/re_types/src/datatypes/utf8pair.rs @@ -91,7 +91,7 @@ impl ::re_types_core::Loggable for Utf8Pair { let inner_data: arrow::buffer::Buffer = first .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for Utf8Pair { let inner_data: arrow::buffer::Buffer = second .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -210,7 +210,7 @@ impl ::re_types_core::Loggable for Utf8Pair { .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { - crate::datatypes::Utf8(::re_types_core::ArrowString(v)) + crate::datatypes::Utf8(::re_types_core::ArrowString::from(v)) }) }) }) @@ -265,7 +265,7 @@ impl ::re_types_core::Loggable for Utf8Pair { .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { - crate::datatypes::Utf8(::re_types_core::ArrowString(v)) + crate::datatypes::Utf8(::re_types_core::ArrowString::from(v)) }) }) }) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs index f0d4dfcbe840..c7a341da3438 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs @@ -67,8 +67,11 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), ); - let inner_data: arrow::buffer::Buffer = - data0.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0 + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -122,7 +125,8 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { .transpose() }) .map(|res_or_opt| { - res_or_opt.map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString(v))) + res_or_opt + .map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString::from(v))) }) .collect::>>>() .with_context("rerun.testing.components.AffixFuzzer10#single_string_optional")? diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs index 3ac94f10ce65..fe8e4847fe44 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs @@ -80,8 +80,10 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { let offsets = arrow::buffer::OffsetBuffer::::from_lengths( data0_inner_data.iter().map(|datum| datum.len()), ); - let inner_data: arrow::buffer::Buffer = - data0_inner_data.into_iter().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0_inner_data + .into_iter() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -158,7 +160,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs index e9a1fa10b891..a38e831ac11e 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs @@ -80,8 +80,10 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { let offsets = arrow::buffer::OffsetBuffer::::from_lengths( data0_inner_data.iter().map(|datum| datum.len()), ); - let inner_data: arrow::buffer::Buffer = - data0_inner_data.into_iter().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0_inner_data + .into_iter() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -158,7 +160,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs index bde7dad70cd1..4e9e6c414ca8 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs @@ -67,8 +67,11 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), ); - let inner_data: arrow::buffer::Buffer = - data0.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0 + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -122,7 +125,8 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { .transpose() }) .map(|res_or_opt| { - res_or_opt.map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString(v))) + res_or_opt + .map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString::from(v))) }) .collect::>>>() .with_context("rerun.testing.components.AffixFuzzer9#single_string_required")? diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs index 4a2a25afa768..a6bdbe5c3b41 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs @@ -191,9 +191,8 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let inner_data: arrow::buffer::Buffer = single_string_required .into_iter() .flatten() - .flat_map(|s| s.0) + .flat_map(|s| s.into_arrow2_buffer()) .collect(); - #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { StringArray::new_unchecked( @@ -228,9 +227,8 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let inner_data: arrow::buffer::Buffer = single_string_optional .into_iter() .flatten() - .flat_map(|s| s.0) + .flat_map(|s| s.into_arrow2_buffer()) .collect(); - #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { StringArray::new_unchecked( @@ -324,7 +322,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let inner_data: arrow::buffer::Buffer = many_strings_required_inner_data .into_iter() - .flat_map(|s| s.0) + .flat_map(|s| s.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -380,7 +378,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let inner_data: arrow::buffer::Buffer = many_strings_optional_inner_data .into_iter() - .flat_map(|s| s.0) + .flat_map(|s| s.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -568,7 +566,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() @@ -625,7 +623,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() @@ -783,7 +781,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .map(|res_or_opt| { res_or_opt .map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() @@ -904,7 +902,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .map(|res_or_opt| { res_or_opt .map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs index 51f4a1a8dd01..0807008bf746 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { let inner_data: arrow::buffer::Buffer = s .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -239,7 +239,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { res_or_opt.map(|res_or_opt| { res_or_opt.map(|v| { crate::testing::datatypes::StringComponent( - ::re_types_core::ArrowString(v), + ::re_types_core::ArrowString::from(v), ) }) }) diff --git a/crates/store/re_types/src/testing/datatypes/string_component.rs b/crates/store/re_types/src/testing/datatypes/string_component.rs index b50abc95dcf9..1b2e10502f04 100644 --- a/crates/store/re_types/src/testing/datatypes/string_component.rs +++ b/crates/store/re_types/src/testing/datatypes/string_component.rs @@ -61,8 +61,11 @@ impl ::re_types_core::Loggable for StringComponent { .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), ); - let inner_data: arrow::buffer::Buffer = - data0.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0 + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -116,7 +119,8 @@ impl ::re_types_core::Loggable for StringComponent { .transpose() }) .map(|res_or_opt| { - res_or_opt.map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString(v))) + res_or_opt + .map(|res_or_opt| res_or_opt.map(|v| ::re_types_core::ArrowString::from(v))) }) .collect::>>>() .with_context("rerun.testing.datatypes.StringComponent#value")? diff --git a/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs b/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs index 921f10845ee9..7dd2246d1c5c 100644 --- a/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs +++ b/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs @@ -75,8 +75,10 @@ impl ::re_types_core::Loggable for Utf8List { let offsets = arrow::buffer::OffsetBuffer::::from_lengths( data0_inner_data.iter().map(|datum| datum.len()), ); - let inner_data: arrow::buffer::Buffer = - data0_inner_data.into_iter().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0_inner_data + .into_iter() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -151,7 +153,7 @@ impl ::re_types_core::Loggable for Utf8List { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| ::re_types_core::ArrowString(v)) + res_or_opt.map(|v| ::re_types_core::ArrowString::from(v)) }) }) .collect::>>>() diff --git a/crates/store/re_types_core/src/arrow_string.rs b/crates/store/re_types_core/src/arrow_string.rs index 17f73eaeea5f..9fd8b6d4e633 100644 --- a/crates/store/re_types_core/src/arrow_string.rs +++ b/crates/store/re_types_core/src/arrow_string.rs @@ -9,7 +9,7 @@ use arrow2::buffer::Buffer; /// arise from returning a `&str` directly, but is significantly more /// performant than doing the full allocation necessary to return a `String`. #[derive(Clone, Debug, Default)] -pub struct ArrowString(pub Buffer); +pub struct ArrowString(Buffer); impl crate::SizeBytes for ArrowString { #[inline] @@ -54,6 +54,18 @@ impl ArrowString { pub fn as_str(&self) -> &str { std::str::from_utf8(self.0.as_ref()).unwrap_or("INVALID UTF-8") } + + #[inline] + pub fn into_arrow2_buffer(self) -> arrow2::buffer::Buffer { + self.0 + } +} + +impl From> for ArrowString { + #[inline] + fn from(buf: arrow2::buffer::Buffer) -> Self { + Self(buf) + } } impl From for ArrowString { diff --git a/crates/store/re_types_core/src/datatypes/entity_path.rs b/crates/store/re_types_core/src/datatypes/entity_path.rs index c1e6a5f464c8..f3b2fca0e5c8 100644 --- a/crates/store/re_types_core/src/datatypes/entity_path.rs +++ b/crates/store/re_types_core/src/datatypes/entity_path.rs @@ -62,8 +62,11 @@ impl crate::Loggable for EntityPath { .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), ); - let inner_data: arrow::buffer::Buffer = - data0.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0 + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -117,7 +120,7 @@ impl crate::Loggable for EntityPath { .transpose() }) .map(|res_or_opt| { - res_or_opt.map(|res_or_opt| res_or_opt.map(|v| crate::ArrowString(v))) + res_or_opt.map(|res_or_opt| res_or_opt.map(|v| crate::ArrowString::from(v))) }) .collect::>>>() .with_context("rerun.datatypes.EntityPath#path")? diff --git a/crates/store/re_types_core/src/datatypes/utf8.rs b/crates/store/re_types_core/src/datatypes/utf8.rs index af4fdebfb3d7..052f94e220d5 100644 --- a/crates/store/re_types_core/src/datatypes/utf8.rs +++ b/crates/store/re_types_core/src/datatypes/utf8.rs @@ -62,8 +62,11 @@ impl crate::Loggable for Utf8 { .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), ); - let inner_data: arrow::buffer::Buffer = - data0.into_iter().flatten().flat_map(|s| s.0).collect(); + let inner_data: arrow::buffer::Buffer = data0 + .into_iter() + .flatten() + .flat_map(|s| s.into_arrow2_buffer()) + .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -117,7 +120,7 @@ impl crate::Loggable for Utf8 { .transpose() }) .map(|res_or_opt| { - res_or_opt.map(|res_or_opt| res_or_opt.map(|v| crate::ArrowString(v))) + res_or_opt.map(|res_or_opt| res_or_opt.map(|v| crate::ArrowString::from(v))) }) .collect::>>>() .with_context("rerun.datatypes.Utf8#value")? diff --git a/crates/store/re_types_core/src/datatypes/visible_time_range.rs b/crates/store/re_types_core/src/datatypes/visible_time_range.rs index 9a9160fbe716..fd0504caec70 100644 --- a/crates/store/re_types_core/src/datatypes/visible_time_range.rs +++ b/crates/store/re_types_core/src/datatypes/visible_time_range.rs @@ -107,7 +107,7 @@ impl crate::Loggable for VisibleTimeRange { let inner_data: arrow::buffer::Buffer = timeline .into_iter() .flatten() - .flat_map(|datum| datum.0 .0) + .flat_map(|datum| datum.0.into_arrow2_buffer()) .collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] as_array_ref(unsafe { @@ -213,7 +213,8 @@ impl crate::Loggable for VisibleTimeRange { }) .map(|res_or_opt| { res_or_opt.map(|res_or_opt| { - res_or_opt.map(|v| crate::datatypes::Utf8(crate::ArrowString(v))) + res_or_opt + .map(|v| crate::datatypes::Utf8(crate::ArrowString::from(v))) }) }) .collect::>>>()