From 58dff951f5816f1ef8a5f3344fe4253a9dc23924 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Thu, 21 Nov 2024 15:35:02 +0100 Subject: [PATCH] Rust API: be explicit about when we're using the arrow2 crate This is part of migrating away from arrow2 --- .../re_types_builder/src/codegen/rust/api.rs | 38 ++-- .../src/codegen/rust/arrow.rs | 2 +- .../src/codegen/rust/deserializer.rs | 12 +- .../src/codegen/rust/reflection.rs | 2 +- .../src/codegen/rust/serializer.rs | 8 +- crates/store/re_chunk/src/batcher.rs | 46 ++-- crates/store/re_chunk/src/chunk.rs | 10 +- crates/store/re_chunk/src/helpers.rs | 12 +- crates/store/re_chunk/src/iter.rs | 2 +- crates/store/re_chunk/src/transport.rs | 12 +- crates/store/re_chunk/tests/latest_at.rs | 6 +- crates/store/re_chunk/tests/range.rs | 6 +- .../store/re_chunk_store/tests/memory_test.rs | 2 +- crates/store/re_format_arrow/src/lib.rs | 2 +- .../re_log_types/src/example_components.rs | 48 ++--- .../re_log_types/src/path/entity_path.rs | 14 +- .../src/archetypes/annotation_context.rs | 4 +- .../store/re_types/src/archetypes/arrows2d.rs | 18 +- .../store/re_types/src/archetypes/arrows3d.rs | 16 +- .../store/re_types/src/archetypes/asset3d.rs | 8 +- .../re_types/src/archetypes/asset_video.rs | 6 +- .../re_types/src/archetypes/bar_chart.rs | 6 +- .../store/re_types/src/archetypes/boxes2d.rs | 18 +- .../store/re_types/src/archetypes/boxes3d.rs | 22 +- .../re_types/src/archetypes/capsules3d.rs | 20 +- .../re_types/src/archetypes/depth_image.rs | 16 +- .../src/archetypes/disconnected_space.rs | 4 +- .../re_types/src/archetypes/ellipsoids3d.rs | 22 +- .../re_types/src/archetypes/encoded_image.rs | 10 +- .../src/archetypes/geo_line_strings.rs | 8 +- .../re_types/src/archetypes/geo_points.rs | 10 +- crates/store/re_types/src/archetypes/image.rs | 10 +- .../src/archetypes/instance_poses3d.rs | 12 +- .../re_types/src/archetypes/line_strips2d.rs | 16 +- .../re_types/src/archetypes/line_strips3d.rs | 14 +- .../store/re_types/src/archetypes/mesh3d.rs | 20 +- .../store/re_types/src/archetypes/pinhole.rs | 10 +- .../store/re_types/src/archetypes/points2d.rs | 18 +- .../store/re_types/src/archetypes/points3d.rs | 16 +- .../store/re_types/src/archetypes/scalar.rs | 4 +- .../src/archetypes/segmentation_image.rs | 10 +- .../re_types/src/archetypes/series_line.rs | 10 +- .../re_types/src/archetypes/series_point.rs | 10 +- .../store/re_types/src/archetypes/tensor.rs | 6 +- .../re_types/src/archetypes/text_document.rs | 6 +- .../store/re_types/src/archetypes/text_log.rs | 8 +- .../re_types/src/archetypes/transform3d.rs | 16 +- .../src/archetypes/video_frame_reference.rs | 6 +- .../src/archetypes/view_coordinates.rs | 4 +- .../src/blueprint/archetypes/background.rs | 6 +- .../blueprint/archetypes/dataframe_query.rs | 12 +- .../blueprint/archetypes/map_background.rs | 4 +- .../src/blueprint/archetypes/map_zoom.rs | 4 +- .../src/blueprint/archetypes/plot_legend.rs | 6 +- .../src/blueprint/archetypes/scalar_axis.rs | 6 +- .../archetypes/space_view_blueprint.rs | 10 +- .../archetypes/space_view_contents.rs | 4 +- .../archetypes/tensor_scalar_mapping.rs | 8 +- .../archetypes/tensor_slice_selection.rs | 22 +- .../blueprint/archetypes/tensor_view_fit.rs | 4 +- .../archetypes/visible_time_ranges.rs | 4 +- .../blueprint/archetypes/visual_bounds2d.rs | 4 +- .../src/blueprint/components/active_tab.rs | 12 +- .../blueprint/components/apply_latest_at.rs | 12 +- .../blueprint/components/background_kind.rs | 12 +- .../src/blueprint/components/column_share.rs | 17 +- .../components/component_column_selector.rs | 12 +- .../src/blueprint/components/corner2d.rs | 12 +- .../blueprint/components/filter_by_range.rs | 12 +- .../components/filter_is_not_null.rs | 12 +- .../blueprint/components/included_content.rs | 12 +- .../src/blueprint/components/interactive.rs | 12 +- .../components/lock_range_during_zoom.rs | 12 +- .../src/blueprint/components/map_provider.rs | 12 +- .../src/blueprint/components/panel_state.rs | 12 +- .../blueprint/components/query_expression.rs | 12 +- .../src/blueprint/components/row_share.rs | 17 +- .../blueprint/components/selected_columns.rs | 12 +- .../blueprint/components/space_view_class.rs | 12 +- .../blueprint/components/space_view_origin.rs | 12 +- .../tensor_dimension_index_slider.rs | 18 +- .../src/blueprint/components/timeline_name.rs | 12 +- .../src/blueprint/components/view_fit.rs | 12 +- .../components/viewer_recommendation_hash.rs | 16 +- .../src/blueprint/components/visible.rs | 12 +- .../components/visible_time_range.rs | 12 +- .../blueprint/components/visual_bounds2d.rs | 12 +- .../src/blueprint/components/zoom_level.rs | 17 +- .../datatypes/component_column_selector.rs | 18 +- .../blueprint/datatypes/filter_by_range.rs | 18 +- .../blueprint/datatypes/filter_is_not_null.rs | 28 +-- .../blueprint/datatypes/selected_columns.rs | 30 +-- .../tensor_dimension_index_slider.rs | 12 +- .../src/components/aggregation_policy.rs | 12 +- .../re_types/src/components/albedo_factor.rs | 16 +- .../src/components/annotation_context.rs | 16 +- .../re_types/src/components/axis_length.rs | 17 +- crates/store/re_types/src/components/blob.rs | 12 +- .../store/re_types/src/components/class_id.rs | 16 +- crates/store/re_types/src/components/color.rs | 16 +- .../store/re_types/src/components/colormap.rs | 12 +- .../re_types/src/components/depth_meter.rs | 16 +- .../src/components/disconnected_space.rs | 12 +- .../re_types/src/components/draw_order.rs | 17 +- .../re_types/src/components/entity_path.rs | 12 +- .../re_types/src/components/fill_mode.rs | 12 +- .../re_types/src/components/fill_ratio.rs | 16 +- .../src/components/gamma_correction.rs | 16 +- .../src/components/geo_line_string.rs | 12 +- .../re_types/src/components/half_size2d.rs | 16 +- .../re_types/src/components/half_size3d.rs | 16 +- .../re_types/src/components/image_buffer.rs | 12 +- .../re_types/src/components/image_format.rs | 12 +- .../src/components/image_plane_distance.rs | 17 +- .../re_types/src/components/keypoint_id.rs | 16 +- .../store/re_types/src/components/lat_lon.rs | 16 +- .../store/re_types/src/components/length.rs | 16 +- .../re_types/src/components/line_strip2d.rs | 12 +- .../re_types/src/components/line_strip3d.rs | 12 +- .../src/components/magnification_filter.rs | 12 +- .../re_types/src/components/marker_shape.rs | 12 +- .../re_types/src/components/marker_size.rs | 16 +- .../re_types/src/components/media_type.rs | 12 +- crates/store/re_types/src/components/name.rs | 12 +- .../store/re_types/src/components/opacity.rs | 16 +- .../src/components/pinhole_projection.rs | 16 +- .../components/pose_rotation_axis_angle.rs | 12 +- .../src/components/pose_rotation_quat.rs | 16 +- .../re_types/src/components/pose_scale3d.rs | 16 +- .../src/components/pose_transform_mat3x3.rs | 16 +- .../src/components/pose_translation3d.rs | 16 +- .../re_types/src/components/position2d.rs | 16 +- .../re_types/src/components/position3d.rs | 16 +- .../store/re_types/src/components/radius.rs | 16 +- .../store/re_types/src/components/range1d.rs | 16 +- .../re_types/src/components/resolution.rs | 16 +- .../src/components/rotation_axis_angle.rs | 12 +- .../re_types/src/components/rotation_quat.rs | 16 +- .../store/re_types/src/components/scalar.rs | 16 +- .../store/re_types/src/components/scale3d.rs | 16 +- .../re_types/src/components/show_labels.rs | 12 +- .../re_types/src/components/stroke_width.rs | 16 +- .../re_types/src/components/tensor_data.rs | 12 +- .../tensor_dimension_index_selection.rs | 12 +- .../src/components/tensor_height_dimension.rs | 12 +- .../src/components/tensor_width_dimension.rs | 12 +- .../re_types/src/components/texcoord2d.rs | 16 +- crates/store/re_types/src/components/text.rs | 12 +- .../re_types/src/components/text_log_level.rs | 12 +- .../src/components/transform_mat3x3.rs | 16 +- .../src/components/transform_relation.rs | 12 +- .../re_types/src/components/translation3d.rs | 16 +- .../src/components/triangle_indices.rs | 16 +- .../re_types/src/components/value_range.rs | 16 +- .../store/re_types/src/components/vector2d.rs | 16 +- .../store/re_types/src/components/vector3d.rs | 16 +- .../src/components/video_timestamp.rs | 16 +- .../src/components/view_coordinates.rs | 16 +- crates/store/re_types/src/datatypes/angle.rs | 12 +- .../re_types/src/datatypes/annotation_info.rs | 20 +- crates/store/re_types/src/datatypes/blob.rs | 10 +- .../src/datatypes/channel_datatype.rs | 12 +- .../src/datatypes/class_description.rs | 42 ++-- .../datatypes/class_description_map_elem.rs | 22 +- .../store/re_types/src/datatypes/class_id.rs | 12 +- .../re_types/src/datatypes/color_model.rs | 12 +- crates/store/re_types/src/datatypes/dvec2d.rs | 12 +- .../re_types/src/datatypes/image_format.rs | 38 ++-- .../re_types/src/datatypes/keypoint_id.rs | 12 +- .../re_types/src/datatypes/keypoint_pair.rs | 18 +- crates/store/re_types/src/datatypes/mat3x3.rs | 12 +- crates/store/re_types/src/datatypes/mat4x4.rs | 12 +- .../re_types/src/datatypes/pixel_format.rs | 12 +- .../re_types/src/datatypes/quaternion.rs | 12 +- .../store/re_types/src/datatypes/range1d.rs | 12 +- .../store/re_types/src/datatypes/range2d.rs | 18 +- crates/store/re_types/src/datatypes/rgba32.rs | 12 +- .../src/datatypes/rotation_axis_angle.rs | 18 +- .../re_types/src/datatypes/tensor_buffer.rs | 14 +- .../re_types/src/datatypes/tensor_data.rs | 30 +-- .../src/datatypes/tensor_dimension.rs | 14 +- .../tensor_dimension_index_selection.rs | 14 +- .../datatypes/tensor_dimension_selection.rs | 14 +- crates/store/re_types/src/datatypes/uuid.rs | 12 +- crates/store/re_types/src/datatypes/uvec2d.rs | 12 +- crates/store/re_types/src/datatypes/uvec3d.rs | 12 +- crates/store/re_types/src/datatypes/uvec4d.rs | 12 +- crates/store/re_types/src/datatypes/vec2d.rs | 12 +- crates/store/re_types/src/datatypes/vec3d.rs | 12 +- crates/store/re_types/src/datatypes/vec4d.rs | 12 +- .../re_types/src/datatypes/video_timestamp.rs | 12 +- .../src/datatypes/view_coordinates.rs | 12 +- .../src/testing/archetypes/affix_fuzzer1.rs | 46 ++-- .../src/testing/archetypes/affix_fuzzer2.rs | 40 ++-- .../src/testing/archetypes/affix_fuzzer3.rs | 38 ++-- .../src/testing/archetypes/affix_fuzzer4.rs | 38 ++-- .../src/testing/components/affix_fuzzer1.rs | 12 +- .../src/testing/components/affix_fuzzer10.rs | 10 +- .../src/testing/components/affix_fuzzer11.rs | 10 +- .../src/testing/components/affix_fuzzer12.rs | 10 +- .../src/testing/components/affix_fuzzer13.rs | 10 +- .../src/testing/components/affix_fuzzer14.rs | 12 +- .../src/testing/components/affix_fuzzer15.rs | 12 +- .../src/testing/components/affix_fuzzer16.rs | 16 +- .../src/testing/components/affix_fuzzer17.rs | 16 +- .../src/testing/components/affix_fuzzer18.rs | 16 +- .../src/testing/components/affix_fuzzer19.rs | 12 +- .../src/testing/components/affix_fuzzer2.rs | 12 +- .../src/testing/components/affix_fuzzer20.rs | 12 +- .../src/testing/components/affix_fuzzer21.rs | 12 +- .../src/testing/components/affix_fuzzer22.rs | 10 +- .../src/testing/components/affix_fuzzer23.rs | 14 +- .../src/testing/components/affix_fuzzer3.rs | 12 +- .../src/testing/components/affix_fuzzer4.rs | 12 +- .../src/testing/components/affix_fuzzer5.rs | 12 +- .../src/testing/components/affix_fuzzer6.rs | 12 +- .../src/testing/components/affix_fuzzer7.rs | 16 +- .../src/testing/components/affix_fuzzer8.rs | 10 +- .../src/testing/components/affix_fuzzer9.rs | 10 +- .../src/testing/datatypes/affix_fuzzer1.rs | 34 +-- .../src/testing/datatypes/affix_fuzzer2.rs | 10 +- .../src/testing/datatypes/affix_fuzzer20.rs | 18 +- .../src/testing/datatypes/affix_fuzzer21.rs | 14 +- .../src/testing/datatypes/affix_fuzzer22.rs | 12 +- .../src/testing/datatypes/affix_fuzzer3.rs | 24 +-- .../src/testing/datatypes/affix_fuzzer4.rs | 30 +-- .../src/testing/datatypes/affix_fuzzer5.rs | 18 +- .../src/testing/datatypes/enum_test.rs | 12 +- .../src/testing/datatypes/flattened_scalar.rs | 12 +- .../src/testing/datatypes/multi_enum.rs | 26 +-- .../testing/datatypes/primitive_component.rs | 12 +- .../src/testing/datatypes/string_component.rs | 10 +- .../src/testing/datatypes/valued_enum.rs | 12 +- crates/store/re_types/tests/types/validity.rs | 12 +- .../archetypes/container_blueprint.rs | 18 +- .../blueprint/archetypes/panel_blueprint.rs | 4 +- .../archetypes/viewport_blueprint.rs | 12 +- .../src/blueprint/components/auto_layout.rs | 12 +- .../blueprint/components/auto_space_views.rs | 12 +- .../blueprint/components/container_kind.rs | 12 +- .../src/blueprint/components/grid_columns.rs | 16 +- .../components/included_space_view.rs | 16 +- .../blueprint/components/root_container.rs | 16 +- .../components/space_view_maximized.rs | 16 +- .../components/visualizer_overrides.rs | 12 +- .../src/blueprint/datatypes/utf8list.rs | 10 +- .../store/re_types_core/benches/bench_tuid.rs | 6 +- crates/store/re_types_core/src/archetype.rs | 6 +- .../re_types_core/src/archetypes/clear.rs | 4 +- .../src/components/clear_is_recursive.rs | 12 +- .../store/re_types_core/src/datatypes/bool.rs | 10 +- .../src/datatypes/entity_path.rs | 10 +- .../re_types_core/src/datatypes/float32.rs | 12 +- .../re_types_core/src/datatypes/float64.rs | 12 +- .../re_types_core/src/datatypes/time_int.rs | 12 +- .../re_types_core/src/datatypes/time_range.rs | 26 +-- .../src/datatypes/time_range_boundary.rs | 18 +- .../re_types_core/src/datatypes/uint16.rs | 12 +- .../re_types_core/src/datatypes/uint32.rs | 12 +- .../re_types_core/src/datatypes/uint64.rs | 12 +- .../store/re_types_core/src/datatypes/utf8.rs | 10 +- .../src/datatypes/visible_time_range.rs | 22 +- crates/store/re_types_core/src/loggable.rs | 14 +- .../store/re_types_core/src/loggable_batch.rs | 20 +- crates/store/re_types_core/src/tuid.rs | 30 +-- crates/top/re_sdk/src/recording_stream.rs | 23 +- .../src/datatype_uis/singleline_string.rs | 4 +- .../re_data_ui/src/component_ui_registry.rs | 2 +- crates/viewer/re_space_view/src/lib.rs | 2 +- .../viewer/re_space_view/src/results_ext.rs | 2 +- .../src/max_image_dimension_subscriber.rs | 9 +- .../src/line_visualizer_system.rs | 8 +- .../src/point_visualizer_system.rs | 8 +- .../re_viewer/src/blueprint/validation.rs | 6 +- crates/viewer/re_viewer/src/reflection/mod.rs | 200 +++++++++--------- .../src/component_ui_registry.rs | 2 +- .../src/view_properties.rs | 4 +- docs/snippets/all/tutorials/custom_data.rs | 8 +- 278 files changed, 2009 insertions(+), 1993 deletions(-) diff --git a/crates/build/re_types_builder/src/codegen/rust/api.rs b/crates/build/re_types_builder/src/codegen/rust/api.rs index a919b4864a04..99feda813e40 100644 --- a/crates/build/re_types_builder/src/codegen/rust/api.rs +++ b/crates/build/re_types_builder/src/codegen/rust/api.rs @@ -864,15 +864,15 @@ fn quote_trait_impls_for_datatype_or_component( let quoted_arrow_datatype = if let Some(forwarded_type) = forwarded_type.as_ref() { quote! { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - #forwarded_type::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + #forwarded_type::arrow2_datatype() } } } else { let datatype = ArrowDataTypeTokenizer(&datatype, false); quote! { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; #datatype @@ -880,8 +880,8 @@ fn quote_trait_impls_for_datatype_or_component( } }; - let quoted_from_arrow = if optimize_for_buffer_slice { - let from_arrow_body = if let Some(forwarded_type) = forwarded_type.as_ref() { + let quoted_from_arrow2 = if optimize_for_buffer_slice { + let from_arrow2_body = if let Some(forwarded_type) = forwarded_type.as_ref() { let is_pod = obj .try_get_attr::(ATTR_RUST_DERIVE) .map_or(false, |d| d.contains("bytemuck::Pod")) @@ -890,11 +890,11 @@ fn quote_trait_impls_for_datatype_or_component( .map_or(false, |d| d.contains("bytemuck::Pod")); if is_pod { quote! { - #forwarded_type::from_arrow(arrow_data).map(bytemuck::cast_vec) + #forwarded_type::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } else { quote! { - #forwarded_type::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + #forwarded_type::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } } else { @@ -923,13 +923,13 @@ fn quote_trait_impls_for_datatype_or_component( quote! { #[inline] - fn from_arrow( + fn from_arrow2( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult> where Self: Sized { - #from_arrow_body + #from_arrow2_body } } } else { @@ -939,7 +939,7 @@ fn quote_trait_impls_for_datatype_or_component( // Forward deserialization to existing datatype if it's transparent. let quoted_deserializer = if let Some(forwarded_type) = forwarded_type.as_ref() { quote! { - #forwarded_type::from_arrow_opt(arrow_data).map(|v| v.into_iter().map(|v| v.map(Self)).collect()) + #forwarded_type::from_arrow2_opt(arrow_data).map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } else { let quoted_deserializer = quote_arrow_deserializer(arrow_registry, objects, obj); @@ -956,13 +956,13 @@ fn quote_trait_impls_for_datatype_or_component( let quoted_serializer = if let Some(forwarded_type) = forwarded_type.as_ref() { quote! { - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - #forwarded_type::to_arrow_opt(data.into_iter().map(|datum| { + #forwarded_type::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -976,7 +976,7 @@ fn quote_trait_impls_for_datatype_or_component( quote! { // NOTE: Don't inline this, this gets _huge_. - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -1015,7 +1015,7 @@ fn quote_trait_impls_for_datatype_or_component( #quoted_serializer // NOTE: Don't inline this, this gets _huge_. - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -1024,7 +1024,7 @@ fn quote_trait_impls_for_datatype_or_component( #quoted_deserializer } - #quoted_from_arrow + #quoted_from_arrow2 } #quoted_impl_component @@ -1173,7 +1173,7 @@ fn quote_trait_impls_for_archetype(obj: &Object) -> TokenStream { quote! { if let Some(array) = arrays_by_name.get(#field_typ_fqname_str) { - <#component>::from_arrow_opt(&**array) + <#component>::from_arrow2_opt(&**array) .with_context(#obj_field_fqname)? #quoted_collection } else { @@ -1184,7 +1184,7 @@ fn quote_trait_impls_for_archetype(obj: &Object) -> TokenStream { quote! { if let Some(array) = arrays_by_name.get(#field_typ_fqname_str) { Some({ - <#component>::from_arrow_opt(&**array) + <#component>::from_arrow2_opt(&**array) .with_context(#obj_field_fqname)? #quoted_collection }) @@ -1199,7 +1199,7 @@ fn quote_trait_impls_for_archetype(obj: &Object) -> TokenStream { .ok_or_else(DeserializationError::missing_data) .with_context(#obj_field_fqname)?; - <#component>::from_arrow_opt(&**array).with_context(#obj_field_fqname)? #quoted_collection + <#component>::from_arrow2_opt(&**array).with_context(#obj_field_fqname)? #quoted_collection }} }; @@ -1269,7 +1269,7 @@ fn quote_trait_impls_for_archetype(obj: &Object) -> TokenStream { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator, diff --git a/crates/build/re_types_builder/src/codegen/rust/arrow.rs b/crates/build/re_types_builder/src/codegen/rust/arrow.rs index 8809ed7680e9..82509d5ae255 100644 --- a/crates/build/re_types_builder/src/codegen/rust/arrow.rs +++ b/crates/build/re_types_builder/src/codegen/rust/arrow.rs @@ -65,7 +65,7 @@ impl quote::ToTokens for ArrowDataTypeTokenizer<'_> { DataType::Extension(fqname, datatype, _metadata) => { if *recursive { let fqname_use = quote_fqname_as_type_path(fqname); - quote!(<#fqname_use>::arrow_datatype()) + quote!(<#fqname_use>::arrow2_datatype()) } else { let datatype = ArrowDataTypeTokenizer(datatype.to_logical_type(), false); quote!(#datatype) 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 5db7eeee4bc4..5e54a58c939f 100644 --- a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs @@ -18,9 +18,9 @@ use crate::{ /// This short-circuits on error using the `try` (`?`) operator: the outer scope must be one that /// returns a `Result<_, DeserializationError>`! /// -/// There is a 1:1 relationship between `quote_arrow_deserializer` and `Loggable::from_arrow_opt`: +/// There is a 1:1 relationship between `quote_arrow_deserializer` and `Loggable::from_arrow2_opt`: /// ```ignore -/// fn from_arrow_opt(data: &dyn ::arrow2::array::Array) -> DeserializationResult>> { +/// fn from_arrow2_opt(data: &dyn ::arrow2::array::Array) -> DeserializationResult>> { /// Ok(#quoted_deserializer) /// } /// ``` @@ -60,7 +60,7 @@ pub fn quote_arrow_deserializer( let data_src = format_ident!("arrow_data"); let datatype = &arrow_registry.get(&obj.fqname); - let quoted_self_datatype = quote! { Self::arrow_datatype() }; + let quoted_self_datatype = quote! { Self::arrow2_datatype() }; let obj_fqname = obj.fqname.as_str(); let is_enum = obj.is_enum(); @@ -494,7 +494,7 @@ enum InnerRepr { /// /// The `datatype` comes from our compile-time Arrow registry, not from the runtime payload! /// If the datatype happens to be a struct or union, this will merely inject a runtime call to -/// `Loggable::from_arrow_opt` and call it a day, preventing code bloat. +/// `Loggable::from_arrow2_opt` and call it a day, preventing code bloat. /// /// `data_src` is the runtime identifier of the variable holding the Arrow payload (`&dyn ::arrow2::array::Array`). /// The returned `TokenStream` always instantiates a `Vec>`. @@ -517,7 +517,7 @@ fn quote_arrow_field_deserializer( if let DataType::Extension(fqname, _, _) = datatype { if objects.get(fqname).map_or(false, |obj| obj.is_enum()) { let fqname_use = quote_fqname_as_type_path(fqname); - return quote!(#fqname_use::from_arrow_opt(#data_src).with_context(#obj_field_fqname)?.into_iter()); + return quote!(#fqname_use::from_arrow2_opt(#data_src).with_context(#obj_field_fqname)?.into_iter()); } } @@ -848,7 +848,7 @@ fn quote_arrow_field_deserializer( unreachable!() }; let fqname_use = quote_fqname_as_type_path(fqname); - quote!(#fqname_use::from_arrow_opt(#data_src).with_context(#obj_field_fqname)?.into_iter()) + quote!(#fqname_use::from_arrow2_opt(#data_src).with_context(#obj_field_fqname)?.into_iter()) } _ => unimplemented!("{datatype:#?}"), diff --git a/crates/build/re_types_builder/src/codegen/rust/reflection.rs b/crates/build/re_types_builder/src/codegen/rust/reflection.rs index 79819a4fd6a5..de20bee2951d 100644 --- a/crates/build/re_types_builder/src/codegen/rust/reflection.rs +++ b/crates/build/re_types_builder/src/codegen/rust/reflection.rs @@ -145,7 +145,7 @@ fn generate_component_reflection( ComponentReflection { docstring_md: #docstring_md, custom_placeholder: #custom_placeholder, - datatype: #type_name::arrow_datatype(), + datatype: #type_name::arrow2_datatype(), } }; quoted_pairs.push(quote! { (#quoted_name, #quoted_reflection) }); 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 3b6df80ab07c..4ac39260cb86 100644 --- a/crates/build/re_types_builder/src/codegen/rust/serializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/serializer.rs @@ -19,7 +19,7 @@ pub fn quote_arrow_serializer( ) -> TokenStream { let datatype = &arrow_registry.get(&obj.fqname); - let quoted_datatype = quote! { Self::arrow_datatype() }; + let quoted_datatype = quote! { Self::arrow2_datatype() }; let is_enum = obj.is_enum(); let is_arrow_transparent = obj.datatype.is_none(); @@ -51,7 +51,7 @@ pub fn quote_arrow_serializer( let bitmap_dst = format_ident!("{quoted_data_dst}_bitmap"); // The choice of true or false for `elements_are_nullable` here is a bit confusing. - // This code-gen path forms the basis of `to_arrow_opt`, which implies that we + // This code-gen path forms the basis of `to_arrow2_opt`, which implies that we // support nullable elements. Additionally, this MAY be used as a recursive code // path when using an enum within a struct, and that struct within the field may // be null, as such the elements are always handled as nullable. @@ -485,7 +485,7 @@ fn quote_arrow_field_serializer( return quote! {{ _ = #bitmap_src; - #fqname_use::to_arrow_opt(#data_src #option_wrapper)? + #fqname_use::to_arrow2_opt(#data_src #option_wrapper)? }}; } } @@ -903,7 +903,7 @@ fn quote_arrow_field_serializer( quote! {{ _ = #bitmap_src; - #fqname_use::to_arrow_opt(#data_src #option_wrapper)? + #fqname_use::to_arrow2_opt(#data_src #option_wrapper)? }} } diff --git a/crates/store/re_chunk/src/batcher.rs b/crates/store/re_chunk/src/batcher.rs index c12bda62275a..3e09dbb81c2d 100644 --- a/crates/store/re_chunk/src/batcher.rs +++ b/crates/store/re_chunk/src/batcher.rs @@ -1000,9 +1000,9 @@ mod tests { let timepoint2 = TimePoint::default().with(timeline1, 43); let timepoint3 = TimePoint::default().with(timeline1, 44); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; @@ -1079,9 +1079,9 @@ mod tests { let timeless = TimePoint::default(); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; @@ -1155,9 +1155,9 @@ mod tests { let timepoint2 = TimePoint::default().with(timeline1, 43); let timepoint3 = TimePoint::default().with(timeline1, 44); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; @@ -1271,9 +1271,9 @@ mod tests { .with(timeline1, 44) .with(timeline2, 1001); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; @@ -1391,10 +1391,10 @@ mod tests { let timepoint2 = TimePoint::default().with(timeline1, 43); let timepoint3 = TimePoint::default().with(timeline1, 44); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; let points2 = - MyPoint64::to_arrow([MyPoint64::new(10.0, 20.0), MyPoint64::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + MyPoint64::to_arrow2([MyPoint64::new(10.0, 20.0), MyPoint64::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; // same name, different datatype @@ -1516,11 +1516,11 @@ mod tests { .with(timeline2, 1003) .with(timeline1, 45); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let points4 = - MyPoint::to_arrow([MyPoint::new(1000.0, 2000.0), MyPoint::new(3000.0, 4000.0)])?; + MyPoint::to_arrow2([MyPoint::new(1000.0, 2000.0), MyPoint::new(3000.0, 4000.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; @@ -1630,11 +1630,11 @@ mod tests { .with(timeline2, 1003) .with(timeline1, 45); - let points1 = MyPoint::to_arrow([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; - let points2 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; - let points3 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points1 = MyPoint::to_arrow2([MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)])?; + let points2 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0), MyPoint::new(30.0, 40.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; let points4 = - MyPoint::to_arrow([MyPoint::new(1000.0, 2000.0), MyPoint::new(3000.0, 4000.0)])?; + MyPoint::to_arrow2([MyPoint::new(1000.0, 2000.0), MyPoint::new(3000.0, 4000.0)])?; let components1 = [(MyPoint::name(), points1.clone())]; let components2 = [(MyPoint::name(), points2.clone())]; diff --git a/crates/store/re_chunk/src/chunk.rs b/crates/store/re_chunk/src/chunk.rs index ab9945a09462..3429e077c666 100644 --- a/crates/store/re_chunk/src/chunk.rs +++ b/crates/store/re_chunk/src/chunk.rs @@ -265,7 +265,7 @@ impl Chunk { .collect_vec(); #[allow(clippy::unwrap_used)] - let row_ids = ::to_arrow(&row_ids) + let row_ids = ::to_arrow2(&row_ids) // Unwrap: native RowIds cannot fail to serialize. .unwrap() .as_any() @@ -295,7 +295,7 @@ impl Chunk { .collect_vec(); #[allow(clippy::unwrap_used)] - let row_ids = ::to_arrow(&row_ids) + let row_ids = ::to_arrow2(&row_ids) // Unwrap: native RowIds cannot fail to serialize. .unwrap() .as_any() @@ -700,7 +700,7 @@ impl Chunk { entity_path, heap_size_bytes: Default::default(), is_sorted: true, - row_ids: ArrowStructArray::new_empty(RowId::arrow_datatype()), + row_ids: ArrowStructArray::new_empty(RowId::arrow2_datatype()), timelines: Default::default(), components: Default::default(), } @@ -1264,11 +1264,11 @@ impl Chunk { // Row IDs { - if *row_ids.data_type().to_logical_type() != RowId::arrow_datatype() { + if *row_ids.data_type().to_logical_type() != RowId::arrow2_datatype() { return Err(ChunkError::Malformed { reason: format!( "RowId data has the wrong datatype: expected {:?} but got {:?} instead", - RowId::arrow_datatype(), + RowId::arrow2_datatype(), *row_ids.data_type(), ), }); diff --git a/crates/store/re_chunk/src/helpers.rs b/crates/store/re_chunk/src/helpers.rs index f02b4b299d5c..43f89fab2bd7 100644 --- a/crates/store/re_chunk/src/helpers.rs +++ b/crates/store/re_chunk/src/helpers.rs @@ -48,7 +48,7 @@ impl Chunk { Err(err) => return Some(Err(err)), }; - let data = C::from_arrow(&*array); + let data = C::from_arrow2(&*array); Some(data.map_err(Into::into)) } @@ -99,7 +99,7 @@ impl Chunk { Err(err) => return Some(Err(err)), }; - match C::from_arrow(&*array) { + match C::from_arrow2(&*array) { Ok(data) => data.into_iter().next().map(Ok), // NOTE: It's already sliced! Err(err) => Some(Err(err.into())), } @@ -148,7 +148,7 @@ impl Chunk { Err(err) => return Some(Err(err)), }; - match C::from_arrow(&*array) { + match C::from_arrow2(&*array) { Ok(data) => data.into_iter().next().map(Ok), // NOTE: It's already sliced! Err(err) => Some(Err(err.into())), } @@ -268,7 +268,7 @@ impl UnitChunkShared { /// Returns an error if the data cannot be deserialized. #[inline] pub fn component_batch(&self) -> Option>> { - let data = C::from_arrow(&*self.component_batch_raw(&C::name())?); + let data = C::from_arrow2(&*self.component_batch_raw(&C::name())?); Some(data.map_err(Into::into)) } @@ -310,7 +310,7 @@ impl UnitChunkShared { Err(err) => return Some(Err(err)), }; - match C::from_arrow(&*array) { + match C::from_arrow2(&*array) { Ok(data) => data.into_iter().next().map(Ok), // NOTE: It's already sliced! Err(err) => Some(Err(err.into())), } @@ -350,7 +350,7 @@ impl UnitChunkShared { Err(err) => return Some(Err(err)), }; - match C::from_arrow(&*array) { + match C::from_arrow2(&*array) { Ok(data) => data.into_iter().next().map(Ok), // NOTE: It's already sliced! Err(err) => Some(Err(err.into())), } diff --git a/crates/store/re_chunk/src/iter.rs b/crates/store/re_chunk/src/iter.rs index f52b6770c4a1..6668dcb47a46 100644 --- a/crates/store/re_chunk/src/iter.rs +++ b/crates/store/re_chunk/src/iter.rs @@ -705,7 +705,7 @@ impl Chunk { }; let values = list_array.values(); - let values = match C::from_arrow(&**values) { + let values = match C::from_arrow2(&**values) { Ok(values) => values, Err(err) => { if cfg!(debug_assertions) { diff --git a/crates/store/re_chunk/src/transport.rs b/crates/store/re_chunk/src/transport.rs index 04d9f2ed78ac..c00753caa556 100644 --- a/crates/store/re_chunk/src/transport.rs +++ b/crates/store/re_chunk/src/transport.rs @@ -476,7 +476,7 @@ impl Chunk { .ok_or_else(|| ChunkError::Malformed { reason: format!( "RowId data has the wrong datatype: expected {:?} but got {:?} instead", - RowId::arrow_datatype(), + RowId::arrow2_datatype(), *row_ids.data_type(), ), })? @@ -660,21 +660,21 @@ mod tests { let timelines2 = BTreeMap::default(); // static - let points1 = MyPoint::to_arrow([ + let points1 = MyPoint::to_arrow2([ MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0), MyPoint::new(5.0, 6.0), ])?; let points2 = None; - let points3 = MyPoint::to_arrow([MyPoint::new(10.0, 20.0)])?; - let points4 = MyPoint::to_arrow([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; + let points3 = MyPoint::to_arrow2([MyPoint::new(10.0, 20.0)])?; + let points4 = MyPoint::to_arrow2([MyPoint::new(100.0, 200.0), MyPoint::new(300.0, 400.0)])?; - let colors1 = MyColor::to_arrow([ + let colors1 = MyColor::to_arrow2([ MyColor::from_rgb(1, 2, 3), MyColor::from_rgb(4, 5, 6), MyColor::from_rgb(7, 8, 9), ])?; - let colors2 = MyColor::to_arrow([MyColor::from_rgb(10, 20, 30)])?; + let colors2 = MyColor::to_arrow2([MyColor::from_rgb(10, 20, 30)])?; let colors3 = None; let colors4 = None; diff --git a/crates/store/re_chunk/tests/latest_at.rs b/crates/store/re_chunk/tests/latest_at.rs index 566df5e7df83..96ebe4c7bba0 100644 --- a/crates/store/re_chunk/tests/latest_at.rs +++ b/crates/store/re_chunk/tests/latest_at.rs @@ -11,9 +11,9 @@ const ENTITY_PATH: &str = "my/entity"; fn datatypes() -> IntMap { [ - (MyPoint::name(), MyPoint::arrow_datatype()), - (MyColor::name(), MyColor::arrow_datatype()), - (MyLabel::name(), MyLabel::arrow_datatype()), + (MyPoint::name(), MyPoint::arrow2_datatype()), + (MyColor::name(), MyColor::arrow2_datatype()), + (MyLabel::name(), MyLabel::arrow2_datatype()), ] .into_iter() .collect() diff --git a/crates/store/re_chunk/tests/range.rs b/crates/store/re_chunk/tests/range.rs index 1c37166bd7b8..c94c7a0fc92e 100644 --- a/crates/store/re_chunk/tests/range.rs +++ b/crates/store/re_chunk/tests/range.rs @@ -14,9 +14,9 @@ const ENTITY_PATH: &str = "my/entity"; fn datatypes() -> IntMap { [ - (MyPoint::name(), MyPoint::arrow_datatype()), - (MyColor::name(), MyColor::arrow_datatype()), - (MyLabel::name(), MyLabel::arrow_datatype()), + (MyPoint::name(), MyPoint::arrow2_datatype()), + (MyColor::name(), MyColor::arrow2_datatype()), + (MyLabel::name(), MyLabel::arrow2_datatype()), ] .into_iter() .collect() diff --git a/crates/store/re_chunk_store/tests/memory_test.rs b/crates/store/re_chunk_store/tests/memory_test.rs index 99ffa6ed2ed0..0f1c2af49979 100644 --- a/crates/store/re_chunk_store/tests/memory_test.rs +++ b/crates/store/re_chunk_store/tests/memory_test.rs @@ -100,7 +100,7 @@ fn scalar_memory_overhead() { let entity_path = re_log_types::entity_path!("scalar"); let timepoint = TimePoint::default().with(Timeline::new("log_time", TimeType::Time), i as i64); - let scalars = Scalar::to_arrow([Scalar::from(i as f64)]).unwrap(); + let scalars = Scalar::to_arrow2([Scalar::from(i as f64)]).unwrap(); let row = PendingRow::new( timepoint, diff --git a/crates/store/re_format_arrow/src/lib.rs b/crates/store/re_format_arrow/src/lib.rs index 9858d1ff9e8c..4b2a76b35cfc 100644 --- a/crates/store/re_format_arrow/src/lib.rs +++ b/crates/store/re_format_arrow/src/lib.rs @@ -67,7 +67,7 @@ fn parse_tuid(array: &dyn Array, index: usize) -> Option { _ => (array.to_boxed(), index), }; - let tuids = Tuid::from_arrow(array.as_ref()).ok()?; + let tuids = Tuid::from_arrow2(array.as_ref()).ok()?; tuids.get(index).copied() } diff --git a/crates/store/re_log_types/src/example_components.rs b/crates/store/re_log_types/src/example_components.rs index f3473f713c43..389e83b85a42 100644 --- a/crates/store/re_log_types/src/example_components.rs +++ b/crates/store/re_log_types/src/example_components.rs @@ -75,7 +75,7 @@ impl SizeBytes for MyPoint { } impl Loggable for MyPoint { - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { use arrow2::datatypes::DataType::Float32; arrow2::datatypes::DataType::Struct(Arc::new(vec![ arrow2::datatypes::Field::new("x", Float32, false), @@ -83,7 +83,7 @@ impl Loggable for MyPoint { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where @@ -100,12 +100,12 @@ impl Loggable for MyPoint { let y_array = arrow2::array::Float32Array::from_vec(ys).boxed(); Ok( - arrow2::array::StructArray::new(Self::arrow_datatype(), vec![x_array, y_array], None) + arrow2::array::StructArray::new(Self::arrow2_datatype(), vec![x_array, y_array], None) .boxed(), ) } - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn arrow2::array::Array, ) -> re_types_core::DeserializationResult>> { let array = data @@ -184,7 +184,7 @@ impl SizeBytes for MyPoint64 { } impl Loggable for MyPoint64 { - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { use arrow2::datatypes::DataType::Float64; arrow2::datatypes::DataType::Struct(Arc::new(vec![ arrow2::datatypes::Field::new("x", Float64, false), @@ -192,7 +192,7 @@ impl Loggable for MyPoint64 { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where @@ -209,12 +209,12 @@ impl Loggable for MyPoint64 { let y_array = arrow2::array::Float64Array::from_vec(ys).boxed(); Ok( - arrow2::array::StructArray::new(Self::arrow_datatype(), vec![x_array, y_array], None) + arrow2::array::StructArray::new(Self::arrow2_datatype(), vec![x_array, y_array], None) .boxed(), ) } - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn arrow2::array::Array, ) -> re_types_core::DeserializationResult>> { let array = data @@ -296,28 +296,28 @@ impl SizeBytes for MyColor { } impl Loggable for MyColor { - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { arrow2::datatypes::DataType::UInt32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where Self: 'a, { use re_types_core::datatypes::UInt32; - UInt32::to_arrow_opt( + UInt32::to_arrow2_opt( data.into_iter() .map(|opt| opt.map(Into::into).map(|c| UInt32(c.0))), ) } - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn arrow2::array::Array, ) -> re_types_core::DeserializationResult>> { use re_types_core::datatypes::UInt32; - Ok(UInt32::from_arrow_opt(data)? + Ok(UInt32::from_arrow2_opt(data)? .into_iter() .map(|opt| opt.map(|v| Self(v.0))) .collect()) @@ -347,28 +347,28 @@ impl SizeBytes for MyLabel { } impl Loggable for MyLabel { - fn arrow_datatype() -> arrow2::datatypes::DataType { - re_types_core::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + re_types_core::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where Self: 'a, { use re_types_core::datatypes::Utf8; - Utf8::to_arrow_opt( + Utf8::to_arrow2_opt( data.into_iter() .map(|opt| opt.map(Into::into).map(|l| Utf8(l.0.clone().into()))), ) } - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn arrow2::array::Array, ) -> re_types_core::DeserializationResult>> { use re_types_core::datatypes::Utf8; - Ok(Utf8::from_arrow_opt(data)? + Ok(Utf8::from_arrow2_opt(data)? .into_iter() .map(|opt| opt.map(|v| Self(v.0.to_string()))) .collect()) @@ -407,28 +407,28 @@ impl SizeBytes for MyIndex { } impl Loggable for MyIndex { - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { arrow2::datatypes::DataType::UInt64 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where Self: 'a, { use re_types_core::datatypes::UInt64; - UInt64::to_arrow_opt( + UInt64::to_arrow2_opt( data.into_iter() .map(|opt| opt.map(Into::into).map(|c| UInt64(c.0))), ) } - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn arrow2::array::Array, ) -> re_types_core::DeserializationResult>> { use re_types_core::datatypes::UInt64; - Ok(UInt64::from_arrow_opt(data)? + Ok(UInt64::from_arrow2_opt(data)? .into_iter() .map(|opt| opt.map(|v| Self(v.0))) .collect()) diff --git a/crates/store/re_log_types/src/path/entity_path.rs b/crates/store/re_log_types/src/path/entity_path.rs index d059f573f188..ea412cf364cf 100644 --- a/crates/store/re_log_types/src/path/entity_path.rs +++ b/crates/store/re_log_types/src/path/entity_path.rs @@ -423,11 +423,11 @@ re_types_core::macros::impl_into_cow!(EntityPath); impl Loggable for EntityPath { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - re_types_core::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + re_types_core::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( _data: impl IntoIterator>>>, ) -> re_types_core::SerializationResult> where @@ -440,23 +440,23 @@ impl Loggable for EntityPath { } #[inline] - fn to_arrow<'a>( + fn to_arrow2<'a>( data: impl IntoIterator>>, ) -> re_types_core::SerializationResult> where Self: 'a, { - re_types_core::datatypes::Utf8::to_arrow( + re_types_core::datatypes::Utf8::to_arrow2( data.into_iter() .map(Into::into) .map(|ent_path| re_types_core::datatypes::Utf8(ent_path.to_string().into())), ) } - fn from_arrow( + fn from_arrow2( array: &dyn ::arrow2::array::Array, ) -> re_types_core::DeserializationResult> { - Ok(re_types_core::datatypes::Utf8::from_arrow(array)? + Ok(re_types_core::datatypes::Utf8::from_arrow2(array)? .into_iter() .map(|utf8| Self::from(utf8.to_string())) .collect()) diff --git a/crates/store/re_types/src/archetypes/annotation_context.rs b/crates/store/re_types/src/archetypes/annotation_context.rs index b2717806c887..22bbd20e1508 100644 --- a/crates/store/re_types/src/archetypes/annotation_context.rs +++ b/crates/store/re_types/src/archetypes/annotation_context.rs @@ -152,7 +152,7 @@ impl ::re_types_core::Archetype for AnnotationContext { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -166,7 +166,7 @@ impl ::re_types_core::Archetype for AnnotationContext { .get("rerun.components.AnnotationContext") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.AnnotationContext#context")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.AnnotationContext#context")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/arrows2d.rs b/crates/store/re_types/src/archetypes/arrows2d.rs index bedc33649bde..61b91af0fbe5 100644 --- a/crates/store/re_types/src/archetypes/arrows2d.rs +++ b/crates/store/re_types/src/archetypes/arrows2d.rs @@ -199,7 +199,7 @@ impl ::re_types_core::Archetype for Arrows2D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -213,7 +213,7 @@ impl ::re_types_core::Archetype for Arrows2D { .get("rerun.components.Vector2D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Arrows2D#vectors")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#vectors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -222,7 +222,7 @@ impl ::re_types_core::Archetype for Arrows2D { }; let origins = if let Some(array) = arrays_by_name.get("rerun.components.Position2D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#origins")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -234,7 +234,7 @@ impl ::re_types_core::Archetype for Arrows2D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -246,7 +246,7 @@ impl ::re_types_core::Archetype for Arrows2D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -258,7 +258,7 @@ impl ::re_types_core::Archetype for Arrows2D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -269,7 +269,7 @@ impl ::re_types_core::Archetype for Arrows2D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#show_labels")? .into_iter() .next() @@ -278,7 +278,7 @@ impl ::re_types_core::Archetype for Arrows2D { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#draw_order")? .into_iter() .next() @@ -288,7 +288,7 @@ impl ::re_types_core::Archetype for Arrows2D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows2D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/arrows3d.rs b/crates/store/re_types/src/archetypes/arrows3d.rs index ce72fc982ec0..fca47c39aacd 100644 --- a/crates/store/re_types/src/archetypes/arrows3d.rs +++ b/crates/store/re_types/src/archetypes/arrows3d.rs @@ -203,7 +203,7 @@ impl ::re_types_core::Archetype for Arrows3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -217,7 +217,7 @@ impl ::re_types_core::Archetype for Arrows3D { .get("rerun.components.Vector3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Arrows3D#vectors")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#vectors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -226,7 +226,7 @@ impl ::re_types_core::Archetype for Arrows3D { }; let origins = if let Some(array) = arrays_by_name.get("rerun.components.Position3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#origins")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -238,7 +238,7 @@ impl ::re_types_core::Archetype for Arrows3D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -250,7 +250,7 @@ impl ::re_types_core::Archetype for Arrows3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -262,7 +262,7 @@ impl ::re_types_core::Archetype for Arrows3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -273,7 +273,7 @@ impl ::re_types_core::Archetype for Arrows3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#show_labels")? .into_iter() .next() @@ -283,7 +283,7 @@ impl ::re_types_core::Archetype for Arrows3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Arrows3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/asset3d.rs b/crates/store/re_types/src/archetypes/asset3d.rs index 5983dff798c7..c52ee742ca05 100644 --- a/crates/store/re_types/src/archetypes/asset3d.rs +++ b/crates/store/re_types/src/archetypes/asset3d.rs @@ -166,7 +166,7 @@ impl ::re_types_core::Archetype for Asset3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -180,7 +180,7 @@ impl ::re_types_core::Archetype for Asset3D { .get("rerun.components.Blob") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Asset3D#blob")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Asset3D#blob")? .into_iter() .next() @@ -189,7 +189,7 @@ impl ::re_types_core::Archetype for Asset3D { .with_context("rerun.archetypes.Asset3D#blob")? }; let media_type = if let Some(array) = arrays_by_name.get("rerun.components.MediaType") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Asset3D#media_type")? .into_iter() .next() @@ -199,7 +199,7 @@ impl ::re_types_core::Archetype for Asset3D { }; let albedo_factor = if let Some(array) = arrays_by_name.get("rerun.components.AlbedoFactor") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Asset3D#albedo_factor")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/asset_video.rs b/crates/store/re_types/src/archetypes/asset_video.rs index e07cdf929fb1..9e6411aac9ce 100644 --- a/crates/store/re_types/src/archetypes/asset_video.rs +++ b/crates/store/re_types/src/archetypes/asset_video.rs @@ -222,7 +222,7 @@ impl ::re_types_core::Archetype for AssetVideo { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -236,7 +236,7 @@ impl ::re_types_core::Archetype for AssetVideo { .get("rerun.components.Blob") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.AssetVideo#blob")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.AssetVideo#blob")? .into_iter() .next() @@ -245,7 +245,7 @@ impl ::re_types_core::Archetype for AssetVideo { .with_context("rerun.archetypes.AssetVideo#blob")? }; let media_type = if let Some(array) = arrays_by_name.get("rerun.components.MediaType") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.AssetVideo#media_type")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/bar_chart.rs b/crates/store/re_types/src/archetypes/bar_chart.rs index a3f841a409e1..caebaadf295e 100644 --- a/crates/store/re_types/src/archetypes/bar_chart.rs +++ b/crates/store/re_types/src/archetypes/bar_chart.rs @@ -133,7 +133,7 @@ impl ::re_types_core::Archetype for BarChart { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -147,7 +147,7 @@ impl ::re_types_core::Archetype for BarChart { .get("rerun.components.TensorData") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.BarChart#values")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.BarChart#values")? .into_iter() .next() @@ -156,7 +156,7 @@ impl ::re_types_core::Archetype for BarChart { .with_context("rerun.archetypes.BarChart#values")? }; let color = if let Some(array) = arrays_by_name.get("rerun.components.Color") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.BarChart#color")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/boxes2d.rs b/crates/store/re_types/src/archetypes/boxes2d.rs index 6a50249836f9..7066ac700d39 100644 --- a/crates/store/re_types/src/archetypes/boxes2d.rs +++ b/crates/store/re_types/src/archetypes/boxes2d.rs @@ -192,7 +192,7 @@ impl ::re_types_core::Archetype for Boxes2D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -206,7 +206,7 @@ impl ::re_types_core::Archetype for Boxes2D { .get("rerun.components.HalfSize2D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Boxes2D#half_sizes")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#half_sizes")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -215,7 +215,7 @@ impl ::re_types_core::Archetype for Boxes2D { }; let centers = if let Some(array) = arrays_by_name.get("rerun.components.Position2D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#centers")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -227,7 +227,7 @@ impl ::re_types_core::Archetype for Boxes2D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -239,7 +239,7 @@ impl ::re_types_core::Archetype for Boxes2D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -251,7 +251,7 @@ impl ::re_types_core::Archetype for Boxes2D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -262,7 +262,7 @@ impl ::re_types_core::Archetype for Boxes2D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#show_labels")? .into_iter() .next() @@ -271,7 +271,7 @@ impl ::re_types_core::Archetype for Boxes2D { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#draw_order")? .into_iter() .next() @@ -281,7 +281,7 @@ impl ::re_types_core::Archetype for Boxes2D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes2D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/boxes3d.rs b/crates/store/re_types/src/archetypes/boxes3d.rs index 80090c6e4c14..180810e27f8c 100644 --- a/crates/store/re_types/src/archetypes/boxes3d.rs +++ b/crates/store/re_types/src/archetypes/boxes3d.rs @@ -230,7 +230,7 @@ impl ::re_types_core::Archetype for Boxes3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -244,7 +244,7 @@ impl ::re_types_core::Archetype for Boxes3D { .get("rerun.components.HalfSize3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Boxes3D#half_sizes")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#half_sizes")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -254,7 +254,7 @@ impl ::re_types_core::Archetype for Boxes3D { let centers = if let Some(array) = arrays_by_name.get("rerun.components.PoseTranslation3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#centers")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -267,7 +267,7 @@ impl ::re_types_core::Archetype for Boxes3D { let rotation_axis_angles = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationAxisAngle") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#rotation_axis_angles")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -280,7 +280,7 @@ impl ::re_types_core::Archetype for Boxes3D { let quaternions = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationQuat") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#quaternions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -292,7 +292,7 @@ impl ::re_types_core::Archetype for Boxes3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -304,7 +304,7 @@ impl ::re_types_core::Archetype for Boxes3D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -315,7 +315,7 @@ impl ::re_types_core::Archetype for Boxes3D { None }; let fill_mode = if let Some(array) = arrays_by_name.get("rerun.components.FillMode") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#fill_mode")? .into_iter() .next() @@ -325,7 +325,7 @@ impl ::re_types_core::Archetype for Boxes3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -336,7 +336,7 @@ impl ::re_types_core::Archetype for Boxes3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#show_labels")? .into_iter() .next() @@ -346,7 +346,7 @@ impl ::re_types_core::Archetype for Boxes3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Boxes3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/capsules3d.rs b/crates/store/re_types/src/archetypes/capsules3d.rs index 9db3227b1a8c..43125d119b81 100644 --- a/crates/store/re_types/src/archetypes/capsules3d.rs +++ b/crates/store/re_types/src/archetypes/capsules3d.rs @@ -232,7 +232,7 @@ impl ::re_types_core::Archetype for Capsules3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -246,7 +246,7 @@ impl ::re_types_core::Archetype for Capsules3D { .get("rerun.components.Length") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Capsules3D#lengths")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#lengths")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -258,7 +258,7 @@ impl ::re_types_core::Archetype for Capsules3D { .get("rerun.components.Radius") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Capsules3D#radii")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -268,7 +268,7 @@ impl ::re_types_core::Archetype for Capsules3D { let translations = if let Some(array) = arrays_by_name.get("rerun.components.PoseTranslation3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#translations")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -281,7 +281,7 @@ impl ::re_types_core::Archetype for Capsules3D { let rotation_axis_angles = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationAxisAngle") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#rotation_axis_angles")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -294,7 +294,7 @@ impl ::re_types_core::Archetype for Capsules3D { let quaternions = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationQuat") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#quaternions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -306,7 +306,7 @@ impl ::re_types_core::Archetype for Capsules3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -318,7 +318,7 @@ impl ::re_types_core::Archetype for Capsules3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -329,7 +329,7 @@ impl ::re_types_core::Archetype for Capsules3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#show_labels")? .into_iter() .next() @@ -339,7 +339,7 @@ impl ::re_types_core::Archetype for Capsules3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Capsules3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/depth_image.rs b/crates/store/re_types/src/archetypes/depth_image.rs index 9032c30bd030..42f82815f263 100644 --- a/crates/store/re_types/src/archetypes/depth_image.rs +++ b/crates/store/re_types/src/archetypes/depth_image.rs @@ -222,7 +222,7 @@ impl ::re_types_core::Archetype for DepthImage { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -236,7 +236,7 @@ impl ::re_types_core::Archetype for DepthImage { .get("rerun.components.ImageBuffer") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.DepthImage#buffer")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#buffer")? .into_iter() .next() @@ -249,7 +249,7 @@ impl ::re_types_core::Archetype for DepthImage { .get("rerun.components.ImageFormat") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.DepthImage#format")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#format")? .into_iter() .next() @@ -258,7 +258,7 @@ impl ::re_types_core::Archetype for DepthImage { .with_context("rerun.archetypes.DepthImage#format")? }; let meter = if let Some(array) = arrays_by_name.get("rerun.components.DepthMeter") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#meter")? .into_iter() .next() @@ -267,7 +267,7 @@ impl ::re_types_core::Archetype for DepthImage { None }; let colormap = if let Some(array) = arrays_by_name.get("rerun.components.Colormap") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#colormap")? .into_iter() .next() @@ -276,7 +276,7 @@ impl ::re_types_core::Archetype for DepthImage { None }; let depth_range = if let Some(array) = arrays_by_name.get("rerun.components.ValueRange") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#depth_range")? .into_iter() .next() @@ -286,7 +286,7 @@ impl ::re_types_core::Archetype for DepthImage { }; let point_fill_ratio = if let Some(array) = arrays_by_name.get("rerun.components.FillRatio") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#point_fill_ratio")? .into_iter() .next() @@ -295,7 +295,7 @@ impl ::re_types_core::Archetype for DepthImage { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DepthImage#draw_order")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs index 04a2a451a86c..e3308b01372b 100644 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ b/crates/store/re_types/src/archetypes/disconnected_space.rs @@ -144,7 +144,7 @@ impl ::re_types_core::Archetype for DisconnectedSpace { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -158,7 +158,7 @@ impl ::re_types_core::Archetype for DisconnectedSpace { .get("rerun.components.DisconnectedSpace") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.DisconnectedSpace#disconnected_space")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.DisconnectedSpace#disconnected_space")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/ellipsoids3d.rs b/crates/store/re_types/src/archetypes/ellipsoids3d.rs index 0d5a1670ffc2..2293bfa84f39 100644 --- a/crates/store/re_types/src/archetypes/ellipsoids3d.rs +++ b/crates/store/re_types/src/archetypes/ellipsoids3d.rs @@ -193,7 +193,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -207,7 +207,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { .get("rerun.components.HalfSize3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Ellipsoids3D#half_sizes")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#half_sizes")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -217,7 +217,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { let centers = if let Some(array) = arrays_by_name.get("rerun.components.PoseTranslation3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#centers")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -230,7 +230,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { let rotation_axis_angles = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationAxisAngle") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#rotation_axis_angles")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -243,7 +243,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { let quaternions = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationQuat") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#quaternions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -255,7 +255,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -267,7 +267,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { }; let line_radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#line_radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -278,7 +278,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { None }; let fill_mode = if let Some(array) = arrays_by_name.get("rerun.components.FillMode") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#fill_mode")? .into_iter() .next() @@ -288,7 +288,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -299,7 +299,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#show_labels")? .into_iter() .next() @@ -309,7 +309,7 @@ impl ::re_types_core::Archetype for Ellipsoids3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Ellipsoids3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/encoded_image.rs b/crates/store/re_types/src/archetypes/encoded_image.rs index 2962feba7c20..ea5bff668cd7 100644 --- a/crates/store/re_types/src/archetypes/encoded_image.rs +++ b/crates/store/re_types/src/archetypes/encoded_image.rs @@ -162,7 +162,7 @@ impl ::re_types_core::Archetype for EncodedImage { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -176,7 +176,7 @@ impl ::re_types_core::Archetype for EncodedImage { .get("rerun.components.Blob") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.EncodedImage#blob")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.EncodedImage#blob")? .into_iter() .next() @@ -185,7 +185,7 @@ impl ::re_types_core::Archetype for EncodedImage { .with_context("rerun.archetypes.EncodedImage#blob")? }; let media_type = if let Some(array) = arrays_by_name.get("rerun.components.MediaType") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.EncodedImage#media_type")? .into_iter() .next() @@ -194,7 +194,7 @@ impl ::re_types_core::Archetype for EncodedImage { None }; let opacity = if let Some(array) = arrays_by_name.get("rerun.components.Opacity") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.EncodedImage#opacity")? .into_iter() .next() @@ -203,7 +203,7 @@ impl ::re_types_core::Archetype for EncodedImage { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.EncodedImage#draw_order")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/geo_line_strings.rs b/crates/store/re_types/src/archetypes/geo_line_strings.rs index 242a99868902..560442880977 100644 --- a/crates/store/re_types/src/archetypes/geo_line_strings.rs +++ b/crates/store/re_types/src/archetypes/geo_line_strings.rs @@ -158,7 +158,7 @@ impl ::re_types_core::Archetype for GeoLineStrings { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -172,7 +172,7 @@ impl ::re_types_core::Archetype for GeoLineStrings { .get("rerun.components.GeoLineString") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.GeoLineStrings#line_strings")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoLineStrings#line_strings")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -181,7 +181,7 @@ impl ::re_types_core::Archetype for GeoLineStrings { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoLineStrings#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -193,7 +193,7 @@ impl ::re_types_core::Archetype for GeoLineStrings { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoLineStrings#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/geo_points.rs b/crates/store/re_types/src/archetypes/geo_points.rs index 05e6a9c676a7..500c7e8d4a2d 100644 --- a/crates/store/re_types/src/archetypes/geo_points.rs +++ b/crates/store/re_types/src/archetypes/geo_points.rs @@ -157,7 +157,7 @@ impl ::re_types_core::Archetype for GeoPoints { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -171,7 +171,7 @@ impl ::re_types_core::Archetype for GeoPoints { .get("rerun.components.LatLon") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.GeoPoints#positions")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoPoints#positions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -180,7 +180,7 @@ impl ::re_types_core::Archetype for GeoPoints { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoPoints#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -192,7 +192,7 @@ impl ::re_types_core::Archetype for GeoPoints { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoPoints#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -204,7 +204,7 @@ impl ::re_types_core::Archetype for GeoPoints { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.GeoPoints#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/image.rs b/crates/store/re_types/src/archetypes/image.rs index 92b6338291f5..9b6c68978d09 100644 --- a/crates/store/re_types/src/archetypes/image.rs +++ b/crates/store/re_types/src/archetypes/image.rs @@ -241,7 +241,7 @@ impl ::re_types_core::Archetype for Image { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -255,7 +255,7 @@ impl ::re_types_core::Archetype for Image { .get("rerun.components.ImageBuffer") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Image#buffer")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Image#buffer")? .into_iter() .next() @@ -268,7 +268,7 @@ impl ::re_types_core::Archetype for Image { .get("rerun.components.ImageFormat") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Image#format")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Image#format")? .into_iter() .next() @@ -277,7 +277,7 @@ impl ::re_types_core::Archetype for Image { .with_context("rerun.archetypes.Image#format")? }; let opacity = if let Some(array) = arrays_by_name.get("rerun.components.Opacity") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Image#opacity")? .into_iter() .next() @@ -286,7 +286,7 @@ impl ::re_types_core::Archetype for Image { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Image#draw_order")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/instance_poses3d.rs b/crates/store/re_types/src/archetypes/instance_poses3d.rs index 2bae38d77e5b..0903a53dfb68 100644 --- a/crates/store/re_types/src/archetypes/instance_poses3d.rs +++ b/crates/store/re_types/src/archetypes/instance_poses3d.rs @@ -205,7 +205,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -217,7 +217,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { let translations = if let Some(array) = arrays_by_name.get("rerun.components.PoseTranslation3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.InstancePoses3D#translations")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -230,7 +230,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { let rotation_axis_angles = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationAxisAngle") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.InstancePoses3D#rotation_axis_angles")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -243,7 +243,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { let quaternions = if let Some(array) = arrays_by_name.get("rerun.components.PoseRotationQuat") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.InstancePoses3D#quaternions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -255,7 +255,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { }; let scales = if let Some(array) = arrays_by_name.get("rerun.components.PoseScale3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.InstancePoses3D#scales")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -268,7 +268,7 @@ impl ::re_types_core::Archetype for InstancePoses3D { let mat3x3 = if let Some(array) = arrays_by_name.get("rerun.components.PoseTransformMat3x3") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.InstancePoses3D#mat3x3")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/line_strips2d.rs b/crates/store/re_types/src/archetypes/line_strips2d.rs index e9bb3b73a4b5..259ded243719 100644 --- a/crates/store/re_types/src/archetypes/line_strips2d.rs +++ b/crates/store/re_types/src/archetypes/line_strips2d.rs @@ -222,7 +222,7 @@ impl ::re_types_core::Archetype for LineStrips2D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -236,7 +236,7 @@ impl ::re_types_core::Archetype for LineStrips2D { .get("rerun.components.LineStrip2D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.LineStrips2D#strips")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#strips")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -245,7 +245,7 @@ impl ::re_types_core::Archetype for LineStrips2D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -257,7 +257,7 @@ impl ::re_types_core::Archetype for LineStrips2D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -269,7 +269,7 @@ impl ::re_types_core::Archetype for LineStrips2D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -280,7 +280,7 @@ impl ::re_types_core::Archetype for LineStrips2D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#show_labels")? .into_iter() .next() @@ -289,7 +289,7 @@ impl ::re_types_core::Archetype for LineStrips2D { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#draw_order")? .into_iter() .next() @@ -299,7 +299,7 @@ impl ::re_types_core::Archetype for LineStrips2D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips2D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/line_strips3d.rs b/crates/store/re_types/src/archetypes/line_strips3d.rs index f48259fc2170..0080beae7aec 100644 --- a/crates/store/re_types/src/archetypes/line_strips3d.rs +++ b/crates/store/re_types/src/archetypes/line_strips3d.rs @@ -228,7 +228,7 @@ impl ::re_types_core::Archetype for LineStrips3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -242,7 +242,7 @@ impl ::re_types_core::Archetype for LineStrips3D { .get("rerun.components.LineStrip3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.LineStrips3D#strips")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#strips")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -251,7 +251,7 @@ impl ::re_types_core::Archetype for LineStrips3D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -263,7 +263,7 @@ impl ::re_types_core::Archetype for LineStrips3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -275,7 +275,7 @@ impl ::re_types_core::Archetype for LineStrips3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -286,7 +286,7 @@ impl ::re_types_core::Archetype for LineStrips3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#show_labels")? .into_iter() .next() @@ -296,7 +296,7 @@ impl ::re_types_core::Archetype for LineStrips3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.LineStrips3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/mesh3d.rs b/crates/store/re_types/src/archetypes/mesh3d.rs index 3ac1ece946ec..46d78a599191 100644 --- a/crates/store/re_types/src/archetypes/mesh3d.rs +++ b/crates/store/re_types/src/archetypes/mesh3d.rs @@ -261,7 +261,7 @@ impl ::re_types_core::Archetype for Mesh3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -275,7 +275,7 @@ impl ::re_types_core::Archetype for Mesh3D { .get("rerun.components.Position3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Mesh3D#vertex_positions")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#vertex_positions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -285,7 +285,7 @@ impl ::re_types_core::Archetype for Mesh3D { let triangle_indices = if let Some(array) = arrays_by_name.get("rerun.components.TriangleIndices") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#triangle_indices")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -297,7 +297,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let vertex_normals = if let Some(array) = arrays_by_name.get("rerun.components.Vector3D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#vertex_normals")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -309,7 +309,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let vertex_colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#vertex_colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -322,7 +322,7 @@ impl ::re_types_core::Archetype for Mesh3D { let vertex_texcoords = if let Some(array) = arrays_by_name.get("rerun.components.Texcoord2D") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#vertex_texcoords")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -334,7 +334,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let albedo_factor = if let Some(array) = arrays_by_name.get("rerun.components.AlbedoFactor") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#albedo_factor")? .into_iter() .next() @@ -344,7 +344,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let albedo_texture_buffer = if let Some(array) = arrays_by_name.get("rerun.components.ImageBuffer") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#albedo_texture_buffer")? .into_iter() .next() @@ -354,7 +354,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let albedo_texture_format = if let Some(array) = arrays_by_name.get("rerun.components.ImageFormat") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#albedo_texture_format")? .into_iter() .next() @@ -364,7 +364,7 @@ impl ::re_types_core::Archetype for Mesh3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Mesh3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/pinhole.rs b/crates/store/re_types/src/archetypes/pinhole.rs index 124dcf47d924..95d09610101d 100644 --- a/crates/store/re_types/src/archetypes/pinhole.rs +++ b/crates/store/re_types/src/archetypes/pinhole.rs @@ -232,7 +232,7 @@ impl ::re_types_core::Archetype for Pinhole { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -246,7 +246,7 @@ impl ::re_types_core::Archetype for Pinhole { .get("rerun.components.PinholeProjection") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Pinhole#image_from_camera")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Pinhole#image_from_camera")? .into_iter() .next() @@ -255,7 +255,7 @@ impl ::re_types_core::Archetype for Pinhole { .with_context("rerun.archetypes.Pinhole#image_from_camera")? }; let resolution = if let Some(array) = arrays_by_name.get("rerun.components.Resolution") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Pinhole#resolution")? .into_iter() .next() @@ -265,7 +265,7 @@ impl ::re_types_core::Archetype for Pinhole { }; let camera_xyz = if let Some(array) = arrays_by_name.get("rerun.components.ViewCoordinates") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Pinhole#camera_xyz")? .into_iter() .next() @@ -275,7 +275,7 @@ impl ::re_types_core::Archetype for Pinhole { }; let image_plane_distance = if let Some(array) = arrays_by_name.get("rerun.components.ImagePlaneDistance") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Pinhole#image_plane_distance")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/points2d.rs b/crates/store/re_types/src/archetypes/points2d.rs index 2f0d162f68bb..47d327e88752 100644 --- a/crates/store/re_types/src/archetypes/points2d.rs +++ b/crates/store/re_types/src/archetypes/points2d.rs @@ -249,7 +249,7 @@ impl ::re_types_core::Archetype for Points2D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -263,7 +263,7 @@ impl ::re_types_core::Archetype for Points2D { .get("rerun.components.Position2D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Points2D#positions")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#positions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -272,7 +272,7 @@ impl ::re_types_core::Archetype for Points2D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -284,7 +284,7 @@ impl ::re_types_core::Archetype for Points2D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -296,7 +296,7 @@ impl ::re_types_core::Archetype for Points2D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -307,7 +307,7 @@ impl ::re_types_core::Archetype for Points2D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#show_labels")? .into_iter() .next() @@ -316,7 +316,7 @@ impl ::re_types_core::Archetype for Points2D { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#draw_order")? .into_iter() .next() @@ -326,7 +326,7 @@ impl ::re_types_core::Archetype for Points2D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -338,7 +338,7 @@ impl ::re_types_core::Archetype for Points2D { }; let keypoint_ids = if let Some(array) = arrays_by_name.get("rerun.components.KeypointId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points2D#keypoint_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/points3d.rs b/crates/store/re_types/src/archetypes/points3d.rs index fb7394b3612f..be320be01354 100644 --- a/crates/store/re_types/src/archetypes/points3d.rs +++ b/crates/store/re_types/src/archetypes/points3d.rs @@ -238,7 +238,7 @@ impl ::re_types_core::Archetype for Points3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -252,7 +252,7 @@ impl ::re_types_core::Archetype for Points3D { .get("rerun.components.Position3D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Points3D#positions")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#positions")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -261,7 +261,7 @@ impl ::re_types_core::Archetype for Points3D { }; let radii = if let Some(array) = arrays_by_name.get("rerun.components.Radius") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#radii")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -273,7 +273,7 @@ impl ::re_types_core::Archetype for Points3D { }; let colors = if let Some(array) = arrays_by_name.get("rerun.components.Color") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#colors")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -285,7 +285,7 @@ impl ::re_types_core::Archetype for Points3D { }; let labels = if let Some(array) = arrays_by_name.get("rerun.components.Text") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#labels")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -296,7 +296,7 @@ impl ::re_types_core::Archetype for Points3D { None }; let show_labels = if let Some(array) = arrays_by_name.get("rerun.components.ShowLabels") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#show_labels")? .into_iter() .next() @@ -306,7 +306,7 @@ impl ::re_types_core::Archetype for Points3D { }; let class_ids = if let Some(array) = arrays_by_name.get("rerun.components.ClassId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#class_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -318,7 +318,7 @@ impl ::re_types_core::Archetype for Points3D { }; let keypoint_ids = if let Some(array) = arrays_by_name.get("rerun.components.KeypointId") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Points3D#keypoint_ids")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/archetypes/scalar.rs b/crates/store/re_types/src/archetypes/scalar.rs index e094175afbaf..f87f9eec60d4 100644 --- a/crates/store/re_types/src/archetypes/scalar.rs +++ b/crates/store/re_types/src/archetypes/scalar.rs @@ -136,7 +136,7 @@ impl ::re_types_core::Archetype for Scalar { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -150,7 +150,7 @@ impl ::re_types_core::Archetype for Scalar { .get("rerun.components.Scalar") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Scalar#scalar")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Scalar#scalar")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/segmentation_image.rs b/crates/store/re_types/src/archetypes/segmentation_image.rs index 6a2da5f741d5..638916255c94 100644 --- a/crates/store/re_types/src/archetypes/segmentation_image.rs +++ b/crates/store/re_types/src/archetypes/segmentation_image.rs @@ -179,7 +179,7 @@ impl ::re_types_core::Archetype for SegmentationImage { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -193,7 +193,7 @@ impl ::re_types_core::Archetype for SegmentationImage { .get("rerun.components.ImageBuffer") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.SegmentationImage#buffer")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SegmentationImage#buffer")? .into_iter() .next() @@ -206,7 +206,7 @@ impl ::re_types_core::Archetype for SegmentationImage { .get("rerun.components.ImageFormat") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.SegmentationImage#format")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SegmentationImage#format")? .into_iter() .next() @@ -215,7 +215,7 @@ impl ::re_types_core::Archetype for SegmentationImage { .with_context("rerun.archetypes.SegmentationImage#format")? }; let opacity = if let Some(array) = arrays_by_name.get("rerun.components.Opacity") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SegmentationImage#opacity")? .into_iter() .next() @@ -224,7 +224,7 @@ impl ::re_types_core::Archetype for SegmentationImage { None }; let draw_order = if let Some(array) = arrays_by_name.get("rerun.components.DrawOrder") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SegmentationImage#draw_order")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/series_line.rs b/crates/store/re_types/src/archetypes/series_line.rs index caca74913862..ccce4ffc5527 100644 --- a/crates/store/re_types/src/archetypes/series_line.rs +++ b/crates/store/re_types/src/archetypes/series_line.rs @@ -183,7 +183,7 @@ impl ::re_types_core::Archetype for SeriesLine { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -193,7 +193,7 @@ impl ::re_types_core::Archetype for SeriesLine { .map(|(name, array)| (name.full_name(), array)) .collect(); let color = if let Some(array) = arrays_by_name.get("rerun.components.Color") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesLine#color")? .into_iter() .next() @@ -202,7 +202,7 @@ impl ::re_types_core::Archetype for SeriesLine { None }; let width = if let Some(array) = arrays_by_name.get("rerun.components.StrokeWidth") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesLine#width")? .into_iter() .next() @@ -211,7 +211,7 @@ impl ::re_types_core::Archetype for SeriesLine { None }; let name = if let Some(array) = arrays_by_name.get("rerun.components.Name") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesLine#name")? .into_iter() .next() @@ -221,7 +221,7 @@ impl ::re_types_core::Archetype for SeriesLine { }; let aggregation_policy = if let Some(array) = arrays_by_name.get("rerun.components.AggregationPolicy") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesLine#aggregation_policy")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/series_point.rs b/crates/store/re_types/src/archetypes/series_point.rs index 15b409864346..74a2293feab7 100644 --- a/crates/store/re_types/src/archetypes/series_point.rs +++ b/crates/store/re_types/src/archetypes/series_point.rs @@ -181,7 +181,7 @@ impl ::re_types_core::Archetype for SeriesPoint { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -191,7 +191,7 @@ impl ::re_types_core::Archetype for SeriesPoint { .map(|(name, array)| (name.full_name(), array)) .collect(); let color = if let Some(array) = arrays_by_name.get("rerun.components.Color") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesPoint#color")? .into_iter() .next() @@ -200,7 +200,7 @@ impl ::re_types_core::Archetype for SeriesPoint { None }; let marker = if let Some(array) = arrays_by_name.get("rerun.components.MarkerShape") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesPoint#marker")? .into_iter() .next() @@ -209,7 +209,7 @@ impl ::re_types_core::Archetype for SeriesPoint { None }; let name = if let Some(array) = arrays_by_name.get("rerun.components.Name") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesPoint#name")? .into_iter() .next() @@ -218,7 +218,7 @@ impl ::re_types_core::Archetype for SeriesPoint { None }; let marker_size = if let Some(array) = arrays_by_name.get("rerun.components.MarkerSize") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.SeriesPoint#marker_size")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/tensor.rs b/crates/store/re_types/src/archetypes/tensor.rs index 5d8ad391a76a..f997ab297fb2 100644 --- a/crates/store/re_types/src/archetypes/tensor.rs +++ b/crates/store/re_types/src/archetypes/tensor.rs @@ -146,7 +146,7 @@ impl ::re_types_core::Archetype for Tensor { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -160,7 +160,7 @@ impl ::re_types_core::Archetype for Tensor { .get("rerun.components.TensorData") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Tensor#data")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Tensor#data")? .into_iter() .next() @@ -169,7 +169,7 @@ impl ::re_types_core::Archetype for Tensor { .with_context("rerun.archetypes.Tensor#data")? }; let value_range = if let Some(array) = arrays_by_name.get("rerun.components.ValueRange") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Tensor#value_range")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/text_document.rs b/crates/store/re_types/src/archetypes/text_document.rs index b9abcb00b4af..7331b76b32aa 100644 --- a/crates/store/re_types/src/archetypes/text_document.rs +++ b/crates/store/re_types/src/archetypes/text_document.rs @@ -180,7 +180,7 @@ impl ::re_types_core::Archetype for TextDocument { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -194,7 +194,7 @@ impl ::re_types_core::Archetype for TextDocument { .get("rerun.components.Text") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.TextDocument#text")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.TextDocument#text")? .into_iter() .next() @@ -203,7 +203,7 @@ impl ::re_types_core::Archetype for TextDocument { .with_context("rerun.archetypes.TextDocument#text")? }; let media_type = if let Some(array) = arrays_by_name.get("rerun.components.MediaType") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.TextDocument#media_type")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/text_log.rs b/crates/store/re_types/src/archetypes/text_log.rs index 7d311a7435ed..20aaaca3b524 100644 --- a/crates/store/re_types/src/archetypes/text_log.rs +++ b/crates/store/re_types/src/archetypes/text_log.rs @@ -158,7 +158,7 @@ impl ::re_types_core::Archetype for TextLog { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -172,7 +172,7 @@ impl ::re_types_core::Archetype for TextLog { .get("rerun.components.Text") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.TextLog#text")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.TextLog#text")? .into_iter() .next() @@ -181,7 +181,7 @@ impl ::re_types_core::Archetype for TextLog { .with_context("rerun.archetypes.TextLog#text")? }; let level = if let Some(array) = arrays_by_name.get("rerun.components.TextLogLevel") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.TextLog#level")? .into_iter() .next() @@ -190,7 +190,7 @@ impl ::re_types_core::Archetype for TextLog { None }; let color = if let Some(array) = arrays_by_name.get("rerun.components.Color") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.TextLog#color")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/transform3d.rs b/crates/store/re_types/src/archetypes/transform3d.rs index da2f38f29529..0fcec845a109 100644 --- a/crates/store/re_types/src/archetypes/transform3d.rs +++ b/crates/store/re_types/src/archetypes/transform3d.rs @@ -298,7 +298,7 @@ impl ::re_types_core::Archetype for Transform3D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -309,7 +309,7 @@ impl ::re_types_core::Archetype for Transform3D { .collect(); let translation = if let Some(array) = arrays_by_name.get("rerun.components.Translation3D") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#translation")? .into_iter() .next() @@ -319,7 +319,7 @@ impl ::re_types_core::Archetype for Transform3D { }; let rotation_axis_angle = if let Some(array) = arrays_by_name.get("rerun.components.RotationAxisAngle") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#rotation_axis_angle")? .into_iter() .next() @@ -328,7 +328,7 @@ impl ::re_types_core::Archetype for Transform3D { None }; let quaternion = if let Some(array) = arrays_by_name.get("rerun.components.RotationQuat") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#quaternion")? .into_iter() .next() @@ -337,7 +337,7 @@ impl ::re_types_core::Archetype for Transform3D { None }; let scale = if let Some(array) = arrays_by_name.get("rerun.components.Scale3D") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#scale")? .into_iter() .next() @@ -346,7 +346,7 @@ impl ::re_types_core::Archetype for Transform3D { None }; let mat3x3 = if let Some(array) = arrays_by_name.get("rerun.components.TransformMat3x3") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#mat3x3")? .into_iter() .next() @@ -356,7 +356,7 @@ impl ::re_types_core::Archetype for Transform3D { }; let relation = if let Some(array) = arrays_by_name.get("rerun.components.TransformRelation") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#relation")? .into_iter() .next() @@ -365,7 +365,7 @@ impl ::re_types_core::Archetype for Transform3D { None }; let axis_length = if let Some(array) = arrays_by_name.get("rerun.components.AxisLength") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#axis_length")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/video_frame_reference.rs b/crates/store/re_types/src/archetypes/video_frame_reference.rs index 861bbf31ded4..8fb800d7e6e0 100644 --- a/crates/store/re_types/src/archetypes/video_frame_reference.rs +++ b/crates/store/re_types/src/archetypes/video_frame_reference.rs @@ -226,7 +226,7 @@ impl ::re_types_core::Archetype for VideoFrameReference { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -240,7 +240,7 @@ impl ::re_types_core::Archetype for VideoFrameReference { .get("rerun.components.VideoTimestamp") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.VideoFrameReference#timestamp")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.VideoFrameReference#timestamp")? .into_iter() .next() @@ -250,7 +250,7 @@ impl ::re_types_core::Archetype for VideoFrameReference { }; let video_reference = if let Some(array) = arrays_by_name.get("rerun.components.EntityPath") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.VideoFrameReference#video_reference")? .into_iter() .next() diff --git a/crates/store/re_types/src/archetypes/view_coordinates.rs b/crates/store/re_types/src/archetypes/view_coordinates.rs index b358ef9cdcbb..51162a56efcb 100644 --- a/crates/store/re_types/src/archetypes/view_coordinates.rs +++ b/crates/store/re_types/src/archetypes/view_coordinates.rs @@ -143,7 +143,7 @@ impl ::re_types_core::Archetype for ViewCoordinates { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -157,7 +157,7 @@ impl ::re_types_core::Archetype for ViewCoordinates { .get("rerun.components.ViewCoordinates") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.ViewCoordinates#xyz")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.ViewCoordinates#xyz")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/background.rs b/crates/store/re_types/src/blueprint/archetypes/background.rs index 1d8a9924ae0d..382aae7d7a8d 100644 --- a/crates/store/re_types/src/blueprint/archetypes/background.rs +++ b/crates/store/re_types/src/blueprint/archetypes/background.rs @@ -107,7 +107,7 @@ impl ::re_types_core::Archetype for Background { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -121,7 +121,7 @@ impl ::re_types_core::Archetype for Background { .get("rerun.blueprint.components.BackgroundKind") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.Background#kind")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.Background#kind")? .into_iter() .next() @@ -130,7 +130,7 @@ impl ::re_types_core::Archetype for Background { .with_context("rerun.blueprint.archetypes.Background#kind")? }; let color = if let Some(array) = arrays_by_name.get("rerun.components.Color") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.Background#color")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs index b36aa45dcd63..78c9dd1ffc0e 100644 --- a/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs +++ b/crates/store/re_types/src/blueprint/archetypes/dataframe_query.rs @@ -138,7 +138,7 @@ impl ::re_types_core::Archetype for DataframeQuery { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -149,7 +149,7 @@ impl ::re_types_core::Archetype for DataframeQuery { .collect(); let timeline = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.TimelineName") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.DataframeQuery#timeline")? .into_iter() .next() @@ -159,7 +159,7 @@ impl ::re_types_core::Archetype for DataframeQuery { }; let filter_by_range = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.FilterByRange") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.DataframeQuery#filter_by_range")? .into_iter() .next() @@ -169,7 +169,7 @@ impl ::re_types_core::Archetype for DataframeQuery { }; let filter_is_not_null = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.FilterIsNotNull") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.DataframeQuery#filter_is_not_null")? .into_iter() .next() @@ -179,7 +179,7 @@ impl ::re_types_core::Archetype for DataframeQuery { }; let apply_latest_at = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.ApplyLatestAt") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.DataframeQuery#apply_latest_at")? .into_iter() .next() @@ -189,7 +189,7 @@ impl ::re_types_core::Archetype for DataframeQuery { }; let select = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.SelectedColumns") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.DataframeQuery#select")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/map_background.rs b/crates/store/re_types/src/blueprint/archetypes/map_background.rs index 1f902c730a4b..b6acd8df48a8 100644 --- a/crates/store/re_types/src/blueprint/archetypes/map_background.rs +++ b/crates/store/re_types/src/blueprint/archetypes/map_background.rs @@ -104,7 +104,7 @@ impl ::re_types_core::Archetype for MapBackground { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -118,7 +118,7 @@ impl ::re_types_core::Archetype for MapBackground { .get("rerun.blueprint.components.MapProvider") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.MapBackground#provider")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.MapBackground#provider")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs b/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs index 405711488b4a..6c7057b7bdab 100644 --- a/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs +++ b/crates/store/re_types/src/blueprint/archetypes/map_zoom.rs @@ -104,7 +104,7 @@ impl ::re_types_core::Archetype for MapZoom { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -118,7 +118,7 @@ impl ::re_types_core::Archetype for MapZoom { .get("rerun.blueprint.components.ZoomLevel") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.MapZoom#zoom")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.MapZoom#zoom")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs b/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs index 9476755fb4ac..14ac217a5b9a 100644 --- a/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs +++ b/crates/store/re_types/src/blueprint/archetypes/plot_legend.rs @@ -116,7 +116,7 @@ impl ::re_types_core::Archetype for PlotLegend { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -127,7 +127,7 @@ impl ::re_types_core::Archetype for PlotLegend { .collect(); let corner = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.Corner2D") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.PlotLegend#corner")? .into_iter() .next() @@ -137,7 +137,7 @@ impl ::re_types_core::Archetype for PlotLegend { }; let visible = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.Visible") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.PlotLegend#visible")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs b/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs index b731fb736cb9..c7ce46374843 100644 --- a/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs +++ b/crates/store/re_types/src/blueprint/archetypes/scalar_axis.rs @@ -114,7 +114,7 @@ impl ::re_types_core::Archetype for ScalarAxis { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -124,7 +124,7 @@ impl ::re_types_core::Archetype for ScalarAxis { .map(|(name, array)| (name.full_name(), array)) .collect(); let range = if let Some(array) = arrays_by_name.get("rerun.components.Range1D") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ScalarAxis#range")? .into_iter() .next() @@ -135,7 +135,7 @@ impl ::re_types_core::Archetype for ScalarAxis { let zoom_lock = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.LockRangeDuringZoom") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ScalarAxis#zoom_lock")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/space_view_blueprint.rs b/crates/store/re_types/src/blueprint/archetypes/space_view_blueprint.rs index 144764064840..119519f21ecd 100644 --- a/crates/store/re_types/src/blueprint/archetypes/space_view_blueprint.rs +++ b/crates/store/re_types/src/blueprint/archetypes/space_view_blueprint.rs @@ -137,7 +137,7 @@ impl ::re_types_core::Archetype for SpaceViewBlueprint { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -151,7 +151,7 @@ impl ::re_types_core::Archetype for SpaceViewBlueprint { .get("rerun.blueprint.components.SpaceViewClass") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#class_identifier")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#class_identifier")? .into_iter() .next() @@ -160,7 +160,7 @@ impl ::re_types_core::Archetype for SpaceViewBlueprint { .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#class_identifier")? }; let display_name = if let Some(array) = arrays_by_name.get("rerun.components.Name") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#display_name")? .into_iter() .next() @@ -170,7 +170,7 @@ impl ::re_types_core::Archetype for SpaceViewBlueprint { }; let space_origin = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.SpaceViewOrigin") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#space_origin")? .into_iter() .next() @@ -180,7 +180,7 @@ impl ::re_types_core::Archetype for SpaceViewBlueprint { }; let visible = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.Visible") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.SpaceViewBlueprint#visible")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/space_view_contents.rs b/crates/store/re_types/src/blueprint/archetypes/space_view_contents.rs index 33b6e7849b72..05efbc1e0a8c 100644 --- a/crates/store/re_types/src/blueprint/archetypes/space_view_contents.rs +++ b/crates/store/re_types/src/blueprint/archetypes/space_view_contents.rs @@ -141,7 +141,7 @@ impl ::re_types_core::Archetype for SpaceViewContents { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -155,7 +155,7 @@ impl ::re_types_core::Archetype for SpaceViewContents { .get("rerun.blueprint.components.QueryExpression") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.SpaceViewContents#query")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.SpaceViewContents#query")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs index a0877142b5a2..b07e5ea686e2 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_scalar_mapping.rs @@ -131,7 +131,7 @@ impl ::re_types_core::Archetype for TensorScalarMapping { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -142,7 +142,7 @@ impl ::re_types_core::Archetype for TensorScalarMapping { .collect(); let mag_filter = if let Some(array) = arrays_by_name.get("rerun.components.MagnificationFilter") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorScalarMapping#mag_filter")? .into_iter() .next() @@ -151,7 +151,7 @@ impl ::re_types_core::Archetype for TensorScalarMapping { None }; let colormap = if let Some(array) = arrays_by_name.get("rerun.components.Colormap") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorScalarMapping#colormap")? .into_iter() .next() @@ -160,7 +160,7 @@ impl ::re_types_core::Archetype for TensorScalarMapping { None }; let gamma = if let Some(array) = arrays_by_name.get("rerun.components.GammaCorrection") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorScalarMapping#gamma")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs index 5b07c992f7be..02f719d986ed 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_slice_selection.rs @@ -140,7 +140,7 @@ impl ::re_types_core::Archetype for TensorSliceSelection { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -151,7 +151,7 @@ impl ::re_types_core::Archetype for TensorSliceSelection { .collect(); let width = if let Some(array) = arrays_by_name.get("rerun.components.TensorWidthDimension") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorSliceSelection#width")? .into_iter() .next() @@ -161,7 +161,7 @@ impl ::re_types_core::Archetype for TensorSliceSelection { }; let height = if let Some(array) = arrays_by_name.get("rerun.components.TensorHeightDimension") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorSliceSelection#height")? .into_iter() .next() @@ -173,7 +173,7 @@ impl ::re_types_core::Archetype for TensorSliceSelection { arrays_by_name.get("rerun.components.TensorDimensionIndexSelection") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorSliceSelection#indices")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -187,12 +187,14 @@ impl ::re_types_core::Archetype for TensorSliceSelection { arrays_by_name.get("rerun.blueprint.components.TensorDimensionIndexSlider") { Some({ - ::from_arrow_opt(&**array) - .with_context("rerun.blueprint.archetypes.TensorSliceSelection#slider")? - .into_iter() - .map(|v| v.ok_or_else(DeserializationError::missing_data)) - .collect::>>() - .with_context("rerun.blueprint.archetypes.TensorSliceSelection#slider")? + ::from_arrow2_opt( + &**array, + ) + .with_context("rerun.blueprint.archetypes.TensorSliceSelection#slider")? + .into_iter() + .map(|v| v.ok_or_else(DeserializationError::missing_data)) + .collect::>>() + .with_context("rerun.blueprint.archetypes.TensorSliceSelection#slider")? }) } else { None diff --git a/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs b/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs index 4fd0a891add6..307f4db131e9 100644 --- a/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs +++ b/crates/store/re_types/src/blueprint/archetypes/tensor_view_fit.rs @@ -102,7 +102,7 @@ impl ::re_types_core::Archetype for TensorViewFit { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -113,7 +113,7 @@ impl ::re_types_core::Archetype for TensorViewFit { .collect(); let scaling = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.ViewFit") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.TensorViewFit#scaling")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs b/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs index 7e68966a55d7..b817ee2a5799 100644 --- a/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs +++ b/crates/store/re_types/src/blueprint/archetypes/visible_time_ranges.rs @@ -112,7 +112,7 @@ impl ::re_types_core::Archetype for VisibleTimeRanges { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -126,7 +126,7 @@ impl ::re_types_core::Archetype for VisibleTimeRanges { .get("rerun.blueprint.components.VisibleTimeRange") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.VisibleTimeRanges#ranges")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.VisibleTimeRanges#ranges")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs b/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs index ffd025e6b21a..f250112e9380 100644 --- a/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs +++ b/crates/store/re_types/src/blueprint/archetypes/visual_bounds2d.rs @@ -110,7 +110,7 @@ impl ::re_types_core::Archetype for VisualBounds2D { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -124,7 +124,7 @@ impl ::re_types_core::Archetype for VisualBounds2D { .get("rerun.blueprint.components.VisualBounds2D") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.VisualBounds2D#range")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.VisualBounds2D#range")? .into_iter() .next() diff --git a/crates/store/re_types/src/blueprint/components/active_tab.rs b/crates/store/re_types/src/blueprint/components/active_tab.rs index 6d94139188bd..462a62ffe13c 100644 --- a/crates/store/re_types/src/blueprint/components/active_tab.rs +++ b/crates/store/re_types/src/blueprint/components/active_tab.rs @@ -72,17 +72,17 @@ impl std::ops::DerefMut for ActiveTab { impl ::re_types_core::Loggable for ActiveTab { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::EntityPath::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::EntityPath::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::EntityPath::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -90,13 +90,13 @@ impl ::re_types_core::Loggable for ActiveTab { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::EntityPath::from_arrow_opt(arrow_data) + crate::datatypes::EntityPath::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/apply_latest_at.rs b/crates/store/re_types/src/blueprint/components/apply_latest_at.rs index 0ac0606db0f2..60662eaab1d7 100644 --- a/crates/store/re_types/src/blueprint/components/apply_latest_at.rs +++ b/crates/store/re_types/src/blueprint/components/apply_latest_at.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for ApplyLatestAt { impl ::re_types_core::Loggable for ApplyLatestAt { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for ApplyLatestAt { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/background_kind.rs b/crates/store/re_types/src/blueprint/components/background_kind.rs index d258fb33cfd2..5d1ab542b8d0 100644 --- a/crates/store/re_types/src/blueprint/components/background_kind.rs +++ b/crates/store/re_types/src/blueprint/components/background_kind.rs @@ -84,13 +84,13 @@ impl std::fmt::Display for BackgroundKind { impl ::re_types_core::Loggable for BackgroundKind { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -114,7 +114,7 @@ impl ::re_types_core::Loggable for BackgroundKind { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -122,7 +122,7 @@ impl ::re_types_core::Loggable for BackgroundKind { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -135,7 +135,7 @@ impl ::re_types_core::Loggable for BackgroundKind { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -148,7 +148,7 @@ impl ::re_types_core::Loggable for BackgroundKind { Some(3) => Ok(Some(Self::SolidColor)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/blueprint/components/column_share.rs b/crates/store/re_types/src/blueprint/components/column_share.rs index feb5792c291d..57896a6535e7 100644 --- a/crates/store/re_types/src/blueprint/components/column_share.rs +++ b/crates/store/re_types/src/blueprint/components/column_share.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for ColumnShare { impl ::re_types_core::Loggable for ColumnShare { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,23 @@ impl ::re_types_core::Loggable for ColumnShare { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float32::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/component_column_selector.rs b/crates/store/re_types/src/blueprint/components/component_column_selector.rs index 23445fc4ec45..d595fea9d2dd 100644 --- a/crates/store/re_types/src/blueprint/components/component_column_selector.rs +++ b/crates/store/re_types/src/blueprint/components/component_column_selector.rs @@ -72,17 +72,17 @@ impl std::ops::DerefMut for ComponentColumnSelector { impl ::re_types_core::Loggable for ComponentColumnSelector { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::ComponentColumnSelector::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::ComponentColumnSelector::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::ComponentColumnSelector::to_arrow_opt(data.into_iter().map( + crate::blueprint::datatypes::ComponentColumnSelector::to_arrow2_opt(data.into_iter().map( |datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), @@ -92,13 +92,13 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { )) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::ComponentColumnSelector::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::ComponentColumnSelector::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/corner2d.rs b/crates/store/re_types/src/blueprint/components/corner2d.rs index 48eedac43c98..1a4505e61f77 100644 --- a/crates/store/re_types/src/blueprint/components/corner2d.rs +++ b/crates/store/re_types/src/blueprint/components/corner2d.rs @@ -86,13 +86,13 @@ impl std::fmt::Display for Corner2D { impl ::re_types_core::Loggable for Corner2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -116,7 +116,7 @@ impl ::re_types_core::Loggable for Corner2D { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for Corner2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for Corner2D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -151,7 +151,7 @@ impl ::re_types_core::Loggable for Corner2D { Some(4) => Ok(Some(Self::RightBottom)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/blueprint/components/filter_by_range.rs b/crates/store/re_types/src/blueprint/components/filter_by_range.rs index 7532481da050..b1658d9e43c0 100644 --- a/crates/store/re_types/src/blueprint/components/filter_by_range.rs +++ b/crates/store/re_types/src/blueprint/components/filter_by_range.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for FilterByRange { impl ::re_types_core::Loggable for FilterByRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::FilterByRange::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::FilterByRange::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::FilterByRange::to_arrow_opt(data.into_iter().map(|datum| { + crate::blueprint::datatypes::FilterByRange::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for FilterByRange { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::FilterByRange::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::FilterByRange::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs b/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs index 748c06bb858c..4628de994d9e 100644 --- a/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs +++ b/crates/store/re_types/src/blueprint/components/filter_is_not_null.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for FilterIsNotNull { impl ::re_types_core::Loggable for FilterIsNotNull { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::FilterIsNotNull::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::FilterIsNotNull::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::FilterIsNotNull::to_arrow_opt(data.into_iter().map(|datum| { + crate::blueprint::datatypes::FilterIsNotNull::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for FilterIsNotNull { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::FilterIsNotNull::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::FilterIsNotNull::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/included_content.rs b/crates/store/re_types/src/blueprint/components/included_content.rs index eb57fc1ea2cc..5cf6e082812c 100644 --- a/crates/store/re_types/src/blueprint/components/included_content.rs +++ b/crates/store/re_types/src/blueprint/components/included_content.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for IncludedContent { impl ::re_types_core::Loggable for IncludedContent { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::EntityPath::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::EntityPath::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::EntityPath::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,13 +91,13 @@ impl ::re_types_core::Loggable for IncludedContent { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::EntityPath::from_arrow_opt(arrow_data) + crate::datatypes::EntityPath::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/interactive.rs b/crates/store/re_types/src/blueprint/components/interactive.rs index 267cdc3f0625..d3b7e62ed8e8 100644 --- a/crates/store/re_types/src/blueprint/components/interactive.rs +++ b/crates/store/re_types/src/blueprint/components/interactive.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for Interactive { impl ::re_types_core::Loggable for Interactive { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl ::re_types_core::Loggable for Interactive { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs b/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs index 1aae7facb00a..32beda76206d 100644 --- a/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs +++ b/crates/store/re_types/src/blueprint/components/lock_range_during_zoom.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for LockRangeDuringZoom { impl ::re_types_core::Loggable for LockRangeDuringZoom { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl ::re_types_core::Loggable for LockRangeDuringZoom { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/map_provider.rs b/crates/store/re_types/src/blueprint/components/map_provider.rs index 795ac984437e..96e643f58c00 100644 --- a/crates/store/re_types/src/blueprint/components/map_provider.rs +++ b/crates/store/re_types/src/blueprint/components/map_provider.rs @@ -86,13 +86,13 @@ impl std::fmt::Display for MapProvider { impl ::re_types_core::Loggable for MapProvider { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -116,7 +116,7 @@ impl ::re_types_core::Loggable for MapProvider { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for MapProvider { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for MapProvider { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -151,7 +151,7 @@ impl ::re_types_core::Loggable for MapProvider { Some(4) => Ok(Some(Self::MapboxSatellite)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/blueprint/components/panel_state.rs b/crates/store/re_types/src/blueprint/components/panel_state.rs index 6260edb501e7..ebdc60024175 100644 --- a/crates/store/re_types/src/blueprint/components/panel_state.rs +++ b/crates/store/re_types/src/blueprint/components/panel_state.rs @@ -76,13 +76,13 @@ impl std::fmt::Display for PanelState { impl ::re_types_core::Loggable for PanelState { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for PanelState { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -114,7 +114,7 @@ impl ::re_types_core::Loggable for PanelState { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -127,7 +127,7 @@ impl ::re_types_core::Loggable for PanelState { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -140,7 +140,7 @@ impl ::re_types_core::Loggable for PanelState { Some(3) => Ok(Some(Self::Expanded)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/blueprint/components/query_expression.rs b/crates/store/re_types/src/blueprint/components/query_expression.rs index 4064987cd883..71984913fd3b 100644 --- a/crates/store/re_types/src/blueprint/components/query_expression.rs +++ b/crates/store/re_types/src/blueprint/components/query_expression.rs @@ -77,17 +77,17 @@ impl std::ops::DerefMut for QueryExpression { impl ::re_types_core::Loggable for QueryExpression { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -95,13 +95,13 @@ impl ::re_types_core::Loggable for QueryExpression { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/row_share.rs b/crates/store/re_types/src/blueprint/components/row_share.rs index 5a60b77931a9..2ac3a7fad68d 100644 --- a/crates/store/re_types/src/blueprint/components/row_share.rs +++ b/crates/store/re_types/src/blueprint/components/row_share.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for RowShare { impl ::re_types_core::Loggable for RowShare { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,23 @@ impl ::re_types_core::Loggable for RowShare { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float32::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/selected_columns.rs b/crates/store/re_types/src/blueprint/components/selected_columns.rs index 2d8b9a6aa89b..c8bb696c7d2b 100644 --- a/crates/store/re_types/src/blueprint/components/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/components/selected_columns.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for SelectedColumns { impl ::re_types_core::Loggable for SelectedColumns { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::SelectedColumns::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::SelectedColumns::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::SelectedColumns::to_arrow_opt(data.into_iter().map(|datum| { + crate::blueprint::datatypes::SelectedColumns::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for SelectedColumns { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::SelectedColumns::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::SelectedColumns::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/space_view_class.rs b/crates/store/re_types/src/blueprint/components/space_view_class.rs index c10f3f36a560..a236ec277dc6 100644 --- a/crates/store/re_types/src/blueprint/components/space_view_class.rs +++ b/crates/store/re_types/src/blueprint/components/space_view_class.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for SpaceViewClass { impl ::re_types_core::Loggable for SpaceViewClass { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for SpaceViewClass { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/space_view_origin.rs b/crates/store/re_types/src/blueprint/components/space_view_origin.rs index 9341bd0313a0..8e5afbb5b7e2 100644 --- a/crates/store/re_types/src/blueprint/components/space_view_origin.rs +++ b/crates/store/re_types/src/blueprint/components/space_view_origin.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for SpaceViewOrigin { impl ::re_types_core::Loggable for SpaceViewOrigin { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::EntityPath::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::EntityPath::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::EntityPath::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for SpaceViewOrigin { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::EntityPath::from_arrow_opt(arrow_data) + crate::datatypes::EntityPath::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs b/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs index c5ff59a9a80a..e33dd858eca8 100644 --- a/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs +++ b/crates/store/re_types/src/blueprint/components/tensor_dimension_index_slider.rs @@ -72,33 +72,33 @@ impl std::ops::DerefMut for TensorDimensionIndexSlider { impl ::re_types_core::Loggable for TensorDimensionIndexSlider { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::TensorDimensionIndexSlider::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::TensorDimensionIndexSlider::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::TensorDimensionIndexSlider::to_arrow_opt(data.into_iter().map( - |datum| { + crate::blueprint::datatypes::TensorDimensionIndexSlider::to_arrow2_opt( + data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), }) - }, - )) + }), + ) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::TensorDimensionIndexSlider::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::TensorDimensionIndexSlider::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/timeline_name.rs b/crates/store/re_types/src/blueprint/components/timeline_name.rs index 895faea6acc4..2b1720dd8ab0 100644 --- a/crates/store/re_types/src/blueprint/components/timeline_name.rs +++ b/crates/store/re_types/src/blueprint/components/timeline_name.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for TimelineName { impl ::re_types_core::Loggable for TimelineName { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for TimelineName { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/view_fit.rs b/crates/store/re_types/src/blueprint/components/view_fit.rs index c2bba38de9a2..dbe3f4a5c3a5 100644 --- a/crates/store/re_types/src/blueprint/components/view_fit.rs +++ b/crates/store/re_types/src/blueprint/components/view_fit.rs @@ -82,13 +82,13 @@ impl std::fmt::Display for ViewFit { impl ::re_types_core::Loggable for ViewFit { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -112,7 +112,7 @@ impl ::re_types_core::Loggable for ViewFit { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for ViewFit { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -133,7 +133,7 @@ impl ::re_types_core::Loggable for ViewFit { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for ViewFit { Some(3) => Ok(Some(Self::FillKeepAspectRatio)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs b/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs index 7a920e591889..c1c4e50af4d2 100644 --- a/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs +++ b/crates/store/re_types/src/blueprint/components/viewer_recommendation_hash.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for ViewerRecommendationHash { impl ::re_types_core::Loggable for ViewerRecommendationHash { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UInt64::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::UInt64::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::UInt64::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::UInt64::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,22 @@ impl ::re_types_core::Loggable for ViewerRecommendationHash { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::UInt64::from_arrow_opt(arrow_data) + crate::datatypes::UInt64::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::UInt64::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::UInt64::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/visible.rs b/crates/store/re_types/src/blueprint/components/visible.rs index 0b32354da401..009963f2c3b2 100644 --- a/crates/store/re_types/src/blueprint/components/visible.rs +++ b/crates/store/re_types/src/blueprint/components/visible.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Visible { impl ::re_types_core::Loggable for Visible { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for Visible { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/visible_time_range.rs b/crates/store/re_types/src/blueprint/components/visible_time_range.rs index 2b75530f8ba8..6c003f3b503b 100644 --- a/crates/store/re_types/src/blueprint/components/visible_time_range.rs +++ b/crates/store/re_types/src/blueprint/components/visible_time_range.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for VisibleTimeRange { impl ::re_types_core::Loggable for VisibleTimeRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::VisibleTimeRange::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::VisibleTimeRange::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::VisibleTimeRange::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::VisibleTimeRange::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl ::re_types_core::Loggable for VisibleTimeRange { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::VisibleTimeRange::from_arrow_opt(arrow_data) + crate::datatypes::VisibleTimeRange::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs b/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs index 20fcc14f3943..3a57b91aa109 100644 --- a/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs +++ b/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for VisualBounds2D { impl ::re_types_core::Loggable for VisualBounds2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Range2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Range2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Range2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,13 +89,13 @@ impl ::re_types_core::Loggable for VisualBounds2D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Range2D::from_arrow_opt(arrow_data) + crate::datatypes::Range2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/blueprint/components/zoom_level.rs b/crates/store/re_types/src/blueprint/components/zoom_level.rs index 2a4f8bd97619..f20294a830c1 100644 --- a/crates/store/re_types/src/blueprint/components/zoom_level.rs +++ b/crates/store/re_types/src/blueprint/components/zoom_level.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for ZoomLevel { impl ::re_types_core::Loggable for ZoomLevel { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float64::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float64::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float64::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float64::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,23 @@ impl ::re_types_core::Loggable for ZoomLevel { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float64::from_arrow_opt(arrow_data) + crate::datatypes::Float64::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float64::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float64::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } 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 a161499feb2c..e06c354774bb 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 @@ -44,24 +44,24 @@ impl ::re_types_core::SizeBytes for ComponentColumnSelector { impl ::re_types_core::Loggable for ComponentColumnSelector { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "entity_path", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "component", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -84,7 +84,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, entity_path): (Vec<_>, Vec<_>) = data @@ -167,7 +167,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -181,7 +181,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -199,7 +199,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { let entity_path = { if !arrays_by_name.contains_key("entity_path") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "entity_path", )) .with_context("rerun.blueprint.datatypes.ComponentColumnSelector"); @@ -258,7 +258,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { let component = { if !arrays_by_name.contains_key("component") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "component", )) .with_context("rerun.blueprint.datatypes.ComponentColumnSelector"); diff --git a/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs b/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs index 072117f1a739..e818f93c14df 100644 --- a/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs +++ b/crates/store/re_types/src/blueprint/datatypes/filter_by_range.rs @@ -44,20 +44,20 @@ impl ::re_types_core::SizeBytes for FilterByRange { impl ::re_types_core::Loggable for FilterByRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "start", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), - Field::new("end", ::arrow_datatype(), false), + Field::new("end", ::arrow2_datatype(), false), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -80,7 +80,7 @@ impl ::re_types_core::Loggable for FilterByRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, start): (Vec<_>, Vec<_>) = data @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for FilterByRange { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for FilterByRange { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -164,7 +164,7 @@ impl ::re_types_core::Loggable for FilterByRange { let start = { if !arrays_by_name.contains_key("start") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "start", )) .with_context("rerun.blueprint.datatypes.FilterByRange"); @@ -186,7 +186,7 @@ impl ::re_types_core::Loggable for FilterByRange { let end = { if !arrays_by_name.contains_key("end") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "end", )) .with_context("rerun.blueprint.datatypes.FilterByRange"); diff --git a/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs b/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs index 90717038cfe1..61b149cf5e0e 100644 --- a/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs +++ b/crates/store/re_types/src/blueprint/datatypes/filter_is_not_null.rs @@ -45,20 +45,20 @@ impl ::re_types_core::SizeBytes for FilterIsNotNull { impl ::re_types_core::Loggable for FilterIsNotNull { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ - Field::new("active", ::arrow_datatype(), false), + Field::new("active", ::arrow2_datatype(), false), Field::new( "column", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -81,7 +81,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, active): (Vec<_>, Vec<_>) = data @@ -119,7 +119,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { }; { _ = column_bitmap; - crate::blueprint::datatypes::ComponentColumnSelector::to_arrow_opt( + crate::blueprint::datatypes::ComponentColumnSelector::to_arrow2_opt( column, )? } @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -163,7 +163,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { let active = { if !arrays_by_name.contains_key("active") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "active", )) .with_context("rerun.blueprint.datatypes.FilterIsNotNull"); @@ -184,15 +184,17 @@ impl ::re_types_core::Loggable for FilterIsNotNull { let column = { if !arrays_by_name.contains_key("column") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "column", )) .with_context("rerun.blueprint.datatypes.FilterIsNotNull"); } let arrow_data = &**arrays_by_name["column"]; - crate::blueprint::datatypes::ComponentColumnSelector::from_arrow_opt(arrow_data) - .with_context("rerun.blueprint.datatypes.FilterIsNotNull#column")? - .into_iter() + crate::blueprint::datatypes::ComponentColumnSelector::from_arrow2_opt( + arrow_data, + ) + .with_context("rerun.blueprint.datatypes.FilterIsNotNull#column")? + .into_iter() }; arrow2::bitmap::utils::ZipValidity::new_with_validity( ::itertools::izip!(active, column), 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 65c3fce46ffb..e2b26eabbbfd 100644 --- a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs @@ -45,7 +45,7 @@ impl ::re_types_core::SizeBytes for SelectedColumns { impl ::re_types_core::Loggable for SelectedColumns { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -53,7 +53,7 @@ impl ::re_types_core::Loggable for SelectedColumns { "time_columns", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for SelectedColumns { "component_columns", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -70,7 +70,7 @@ impl ::re_types_core::Loggable for SelectedColumns { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -93,7 +93,7 @@ impl ::re_types_core::Loggable for SelectedColumns { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, time_columns) : (Vec < _ >, Vec < _ >) = data .iter().map(| datum | { let datum = datum.as_ref().map(| datum | @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for SelectedColumns { time_columns_inner_bitmap : Option < arrow2::bitmap::Bitmap > = None; ListArray::try_new(DataType::List(std::sync::Arc::new(Field::new("item", - < crate ::datatypes::Utf8 > ::arrow_datatype(), false))), + < crate ::datatypes::Utf8 > ::arrow2_datatype(), false))), offsets, { let offsets = arrow2::offset::Offsets:: < i32 > ::try_from_lengths(time_columns_inner_data.iter().map(| datum | { datum.0.len() })) ? .into(); let inner_data : @@ -136,9 +136,9 @@ impl ::re_types_core::Loggable for SelectedColumns { > = None; ListArray::try_new(DataType::List(std::sync::Arc::new(Field::new("item", < crate ::blueprint::datatypes::ComponentColumnSelector > - ::arrow_datatype(), false))), offsets, { _ = + ::arrow2_datatype(), false))), offsets, { _ = component_columns_inner_bitmap; crate - ::blueprint::datatypes::ComponentColumnSelector::to_arrow_opt(component_columns_inner_data + ::blueprint::datatypes::ComponentColumnSelector::to_arrow2_opt(component_columns_inner_data .into_iter().map(Some)) ? }, component_columns_bitmap,) ? .boxed() } }, ], @@ -148,7 +148,7 @@ impl ::re_types_core::Loggable for SelectedColumns { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -162,7 +162,7 @@ impl ::re_types_core::Loggable for SelectedColumns { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -180,7 +180,7 @@ impl ::re_types_core::Loggable for SelectedColumns { let time_columns = { if !arrays_by_name.contains_key("time_columns") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "time_columns", )) .with_context("rerun.blueprint.datatypes.SelectedColumns"); @@ -193,7 +193,7 @@ impl ::re_types_core::Loggable for SelectedColumns { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -304,7 +304,7 @@ impl ::re_types_core::Loggable for SelectedColumns { let component_columns = { if !arrays_by_name.contains_key("component_columns") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "component_columns", )) .with_context("rerun.blueprint.datatypes.SelectedColumns"); @@ -319,7 +319,7 @@ impl ::re_types_core::Loggable for SelectedColumns { std::sync::Arc::new( Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ), @@ -335,7 +335,7 @@ impl ::re_types_core::Loggable for SelectedColumns { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::blueprint::datatypes::ComponentColumnSelector::from_arrow_opt( + crate::blueprint::datatypes::ComponentColumnSelector::from_arrow2_opt( arrow_data_inner, ) .with_context( diff --git a/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs b/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs index 5e064ed1d9c2..d69ffee86956 100644 --- a/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs +++ b/crates/store/re_types/src/blueprint/datatypes/tensor_dimension_index_slider.rs @@ -55,7 +55,7 @@ impl From for u32 { impl ::re_types_core::Loggable for TensorDimensionIndexSlider { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![Field::new( @@ -65,7 +65,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { )])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -88,7 +88,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![{ let (somes, dimension): (Vec<_>, Vec<_>) = data .iter() @@ -117,7 +117,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -149,7 +149,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "dimension", )) .with_context("rerun.blueprint.datatypes.TensorDimensionIndexSlider"); diff --git a/crates/store/re_types/src/components/aggregation_policy.rs b/crates/store/re_types/src/components/aggregation_policy.rs index 421ac0083c5f..aab508c386c4 100644 --- a/crates/store/re_types/src/components/aggregation_policy.rs +++ b/crates/store/re_types/src/components/aggregation_policy.rs @@ -108,13 +108,13 @@ impl std::fmt::Display for AggregationPolicy { impl ::re_types_core::Loggable for AggregationPolicy { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -138,7 +138,7 @@ impl ::re_types_core::Loggable for AggregationPolicy { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for AggregationPolicy { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -159,7 +159,7 @@ impl ::re_types_core::Loggable for AggregationPolicy { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -175,7 +175,7 @@ impl ::re_types_core::Loggable for AggregationPolicy { Some(6) => Ok(Some(Self::MinMaxAverage)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/albedo_factor.rs b/crates/store/re_types/src/components/albedo_factor.rs index b1300535248e..24f4ec79a340 100644 --- a/crates/store/re_types/src/components/albedo_factor.rs +++ b/crates/store/re_types/src/components/albedo_factor.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for AlbedoFactor { impl ::re_types_core::Loggable for AlbedoFactor { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Rgba32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Rgba32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Rgba32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Rgba32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,22 @@ impl ::re_types_core::Loggable for AlbedoFactor { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Rgba32::from_arrow_opt(arrow_data) + crate::datatypes::Rgba32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Rgba32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Rgba32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/annotation_context.rs b/crates/store/re_types/src/components/annotation_context.rs index 3c5d7b627abc..6fc9228699ad 100644 --- a/crates/store/re_types/src/components/annotation_context.rs +++ b/crates/store/re_types/src/components/annotation_context.rs @@ -55,17 +55,17 @@ impl, T: IntoIterator arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -99,11 +99,11 @@ impl ::re_types_core::Loggable for AnnotationContext { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { _ = data0_inner_bitmap; - crate::datatypes::ClassDescriptionMapElem::to_arrow_opt( + crate::datatypes::ClassDescriptionMapElem::to_arrow2_opt( data0_inner_data.into_iter().map(Some), )? }, @@ -114,7 +114,7 @@ impl ::re_types_core::Loggable for AnnotationContext { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AnnotationContext { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -138,7 +138,7 @@ impl ::re_types_core::Loggable for AnnotationContext { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::datatypes::ClassDescriptionMapElem::from_arrow_opt(arrow_data_inner) + crate::datatypes::ClassDescriptionMapElem::from_arrow2_opt(arrow_data_inner) .with_context("rerun.components.AnnotationContext#class_map")? .into_iter() .collect::>() diff --git a/crates/store/re_types/src/components/axis_length.rs b/crates/store/re_types/src/components/axis_length.rs index 95e6033c1c54..b26bb72e5969 100644 --- a/crates/store/re_types/src/components/axis_length.rs +++ b/crates/store/re_types/src/components/axis_length.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for AxisLength { impl ::re_types_core::Loggable for AxisLength { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,23 @@ impl ::re_types_core::Loggable for AxisLength { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float32::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/blob.rs b/crates/store/re_types/src/components/blob.rs index 6dc378a9cd00..6db9bc340c1b 100644 --- a/crates/store/re_types/src/components/blob.rs +++ b/crates/store/re_types/src/components/blob.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for Blob { impl ::re_types_core::Loggable for Blob { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Blob::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Blob::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Blob::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Blob::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl ::re_types_core::Loggable for Blob { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Blob::from_arrow_opt(arrow_data) + crate::datatypes::Blob::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/class_id.rs b/crates/store/re_types/src/components/class_id.rs index 209a001e849e..e3ae4921fd25 100644 --- a/crates/store/re_types/src/components/class_id.rs +++ b/crates/store/re_types/src/components/class_id.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for ClassId { impl ::re_types_core::Loggable for ClassId { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ClassId::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::ClassId::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::ClassId::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::ClassId::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,22 +91,22 @@ impl ::re_types_core::Loggable for ClassId { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::ClassId::from_arrow_opt(arrow_data) + crate::datatypes::ClassId::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::ClassId::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::ClassId::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/color.rs b/crates/store/re_types/src/components/color.rs index 1d8d3d674f0a..06a40cb00305 100644 --- a/crates/store/re_types/src/components/color.rs +++ b/crates/store/re_types/src/components/color.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for Color { impl ::re_types_core::Loggable for Color { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Rgba32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Rgba32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Rgba32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Rgba32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for Color { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Rgba32::from_arrow_opt(arrow_data) + crate::datatypes::Rgba32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Rgba32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Rgba32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/colormap.rs b/crates/store/re_types/src/components/colormap.rs index 669df72b69d8..a81be2d20490 100644 --- a/crates/store/re_types/src/components/colormap.rs +++ b/crates/store/re_types/src/components/colormap.rs @@ -145,13 +145,13 @@ impl std::fmt::Display for Colormap { impl ::re_types_core::Loggable for Colormap { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -175,7 +175,7 @@ impl ::re_types_core::Loggable for Colormap { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -183,7 +183,7 @@ impl ::re_types_core::Loggable for Colormap { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for Colormap { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -213,7 +213,7 @@ impl ::re_types_core::Loggable for Colormap { Some(7) => Ok(Some(Self::CyanToYellow)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/depth_meter.rs b/crates/store/re_types/src/components/depth_meter.rs index 20813ecef617..987c1d79ed27 100644 --- a/crates/store/re_types/src/components/depth_meter.rs +++ b/crates/store/re_types/src/components/depth_meter.rs @@ -75,17 +75,17 @@ impl std::ops::DerefMut for DepthMeter { impl ::re_types_core::Loggable for DepthMeter { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -93,22 +93,22 @@ impl ::re_types_core::Loggable for DepthMeter { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs index 76b174ba8653..f76bda3fe413 100644 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ b/crates/store/re_types/src/components/disconnected_space.rs @@ -79,17 +79,17 @@ impl std::ops::DerefMut for DisconnectedSpace { impl ::re_types_core::Loggable for DisconnectedSpace { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -97,13 +97,13 @@ impl ::re_types_core::Loggable for DisconnectedSpace { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/draw_order.rs b/crates/store/re_types/src/components/draw_order.rs index 8d7e61eecaad..76e305157320 100644 --- a/crates/store/re_types/src/components/draw_order.rs +++ b/crates/store/re_types/src/components/draw_order.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for DrawOrder { impl ::re_types_core::Loggable for DrawOrder { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,22 +91,23 @@ impl ::re_types_core::Loggable for DrawOrder { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float32::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/entity_path.rs b/crates/store/re_types/src/components/entity_path.rs index e1c357fba335..a3c21e0192fd 100644 --- a/crates/store/re_types/src/components/entity_path.rs +++ b/crates/store/re_types/src/components/entity_path.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for EntityPath { impl ::re_types_core::Loggable for EntityPath { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::EntityPath::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::EntityPath::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::EntityPath::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for EntityPath { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::EntityPath::from_arrow_opt(arrow_data) + crate::datatypes::EntityPath::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/fill_mode.rs b/crates/store/re_types/src/components/fill_mode.rs index 42c23f52636f..f47d88d958c7 100644 --- a/crates/store/re_types/src/components/fill_mode.rs +++ b/crates/store/re_types/src/components/fill_mode.rs @@ -94,13 +94,13 @@ impl std::fmt::Display for FillMode { impl ::re_types_core::Loggable for FillMode { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for FillMode { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for FillMode { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for FillMode { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +158,7 @@ impl ::re_types_core::Loggable for FillMode { Some(3) => Ok(Some(Self::Solid)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/fill_ratio.rs b/crates/store/re_types/src/components/fill_ratio.rs index 875eabeaaba1..17cd8e5288af 100644 --- a/crates/store/re_types/src/components/fill_ratio.rs +++ b/crates/store/re_types/src/components/fill_ratio.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for FillRatio { impl ::re_types_core::Loggable for FillRatio { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,22 +91,22 @@ impl ::re_types_core::Loggable for FillRatio { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/gamma_correction.rs b/crates/store/re_types/src/components/gamma_correction.rs index 1f0eb92f020f..fba16194be57 100644 --- a/crates/store/re_types/src/components/gamma_correction.rs +++ b/crates/store/re_types/src/components/gamma_correction.rs @@ -74,17 +74,17 @@ impl std::ops::DerefMut for GammaCorrection { impl ::re_types_core::Loggable for GammaCorrection { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -92,22 +92,22 @@ impl ::re_types_core::Loggable for GammaCorrection { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/geo_line_string.rs b/crates/store/re_types/src/components/geo_line_string.rs index 78b55f7f6434..099c56e676c0 100644 --- a/crates/store/re_types/src/components/geo_line_string.rs +++ b/crates/store/re_types/src/components/geo_line_string.rs @@ -45,17 +45,17 @@ impl, T: IntoIterator> From for G impl ::re_types_core::Loggable for GeoLineString { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,7 +89,7 @@ impl ::re_types_core::Loggable for GeoLineString { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -121,7 +121,7 @@ impl ::re_types_core::Loggable for GeoLineString { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -135,7 +135,7 @@ impl ::re_types_core::Loggable for GeoLineString { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/components/half_size2d.rs b/crates/store/re_types/src/components/half_size2d.rs index 4df2ee5a055f..5174b31f1d51 100644 --- a/crates/store/re_types/src/components/half_size2d.rs +++ b/crates/store/re_types/src/components/half_size2d.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for HalfSize2D { impl ::re_types_core::Loggable for HalfSize2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,22 +91,22 @@ impl ::re_types_core::Loggable for HalfSize2D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow_opt(arrow_data) + crate::datatypes::Vec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec2D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/half_size3d.rs b/crates/store/re_types/src/components/half_size3d.rs index 13f12fb41c14..a79e25b2abec 100644 --- a/crates/store/re_types/src/components/half_size3d.rs +++ b/crates/store/re_types/src/components/half_size3d.rs @@ -73,17 +73,17 @@ impl std::ops::DerefMut for HalfSize3D { impl ::re_types_core::Loggable for HalfSize3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -91,22 +91,22 @@ impl ::re_types_core::Loggable for HalfSize3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/image_buffer.rs b/crates/store/re_types/src/components/image_buffer.rs index 0d7b03a7bcc2..468349ebea37 100644 --- a/crates/store/re_types/src/components/image_buffer.rs +++ b/crates/store/re_types/src/components/image_buffer.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for ImageBuffer { impl ::re_types_core::Loggable for ImageBuffer { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Blob::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Blob::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Blob::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Blob::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl ::re_types_core::Loggable for ImageBuffer { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Blob::from_arrow_opt(arrow_data) + crate::datatypes::Blob::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/image_format.rs b/crates/store/re_types/src/components/image_format.rs index cd5d9c9a6149..6912608adb46 100644 --- a/crates/store/re_types/src/components/image_format.rs +++ b/crates/store/re_types/src/components/image_format.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for ImageFormat { impl ::re_types_core::Loggable for ImageFormat { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ImageFormat::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::ImageFormat::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::ImageFormat::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::ImageFormat::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for ImageFormat { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::ImageFormat::from_arrow_opt(arrow_data) + crate::datatypes::ImageFormat::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/image_plane_distance.rs b/crates/store/re_types/src/components/image_plane_distance.rs index d17116c0398c..b300ff36163c 100644 --- a/crates/store/re_types/src/components/image_plane_distance.rs +++ b/crates/store/re_types/src/components/image_plane_distance.rs @@ -69,17 +69,17 @@ impl std::ops::DerefMut for ImagePlaneDistance { impl ::re_types_core::Loggable for ImagePlaneDistance { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -87,22 +87,23 @@ impl ::re_types_core::Loggable for ImagePlaneDistance { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Float32::from_arrow2(arrow_data) + .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/keypoint_id.rs b/crates/store/re_types/src/components/keypoint_id.rs index 4ff4b070446a..17f68de0e5e3 100644 --- a/crates/store/re_types/src/components/keypoint_id.rs +++ b/crates/store/re_types/src/components/keypoint_id.rs @@ -85,17 +85,17 @@ impl std::ops::DerefMut for KeypointId { impl ::re_types_core::Loggable for KeypointId { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::KeypointId::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::KeypointId::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::KeypointId::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::KeypointId::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -103,22 +103,22 @@ impl ::re_types_core::Loggable for KeypointId { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::KeypointId::from_arrow_opt(arrow_data) + crate::datatypes::KeypointId::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::KeypointId::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::KeypointId::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/lat_lon.rs b/crates/store/re_types/src/components/lat_lon.rs index 3ac0b624308e..d234e2596029 100644 --- a/crates/store/re_types/src/components/lat_lon.rs +++ b/crates/store/re_types/src/components/lat_lon.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for LatLon { impl ::re_types_core::Loggable for LatLon { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::DVec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::DVec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::DVec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::DVec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for LatLon { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::DVec2D::from_arrow_opt(arrow_data) + crate::datatypes::DVec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::DVec2D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::DVec2D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/length.rs b/crates/store/re_types/src/components/length.rs index 9f63882a748c..c9af57f4259d 100644 --- a/crates/store/re_types/src/components/length.rs +++ b/crates/store/re_types/src/components/length.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for Length { impl ::re_types_core::Loggable for Length { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for Length { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/line_strip2d.rs b/crates/store/re_types/src/components/line_strip2d.rs index 92bcefa77a39..fca9aa19e202 100644 --- a/crates/store/re_types/src/components/line_strip2d.rs +++ b/crates/store/re_types/src/components/line_strip2d.rs @@ -55,17 +55,17 @@ impl, T: IntoIterator> From for Li impl ::re_types_core::Loggable for LineStrip2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -99,7 +99,7 @@ impl ::re_types_core::Loggable for LineStrip2D { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for LineStrip2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for LineStrip2D { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/components/line_strip3d.rs b/crates/store/re_types/src/components/line_strip3d.rs index 17eb04132b3f..6283a6309953 100644 --- a/crates/store/re_types/src/components/line_strip3d.rs +++ b/crates/store/re_types/src/components/line_strip3d.rs @@ -55,17 +55,17 @@ impl, T: IntoIterator> From for Li impl ::re_types_core::Loggable for LineStrip3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -99,7 +99,7 @@ impl ::re_types_core::Loggable for LineStrip3D { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for LineStrip3D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for LineStrip3D { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/components/magnification_filter.rs b/crates/store/re_types/src/components/magnification_filter.rs index 57d83aeed587..a88bec0ed014 100644 --- a/crates/store/re_types/src/components/magnification_filter.rs +++ b/crates/store/re_types/src/components/magnification_filter.rs @@ -80,13 +80,13 @@ impl std::fmt::Display for MagnificationFilter { impl ::re_types_core::Loggable for MagnificationFilter { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -110,7 +110,7 @@ impl ::re_types_core::Loggable for MagnificationFilter { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for MagnificationFilter { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for MagnificationFilter { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -143,7 +143,7 @@ impl ::re_types_core::Loggable for MagnificationFilter { Some(2) => Ok(Some(Self::Linear)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/marker_shape.rs b/crates/store/re_types/src/components/marker_shape.rs index caaf90f7ef74..36fd014c26f1 100644 --- a/crates/store/re_types/src/components/marker_shape.rs +++ b/crates/store/re_types/src/components/marker_shape.rs @@ -122,13 +122,13 @@ impl std::fmt::Display for MarkerShape { impl ::re_types_core::Loggable for MarkerShape { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -152,7 +152,7 @@ impl ::re_types_core::Loggable for MarkerShape { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -160,7 +160,7 @@ impl ::re_types_core::Loggable for MarkerShape { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -173,7 +173,7 @@ impl ::re_types_core::Loggable for MarkerShape { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -193,7 +193,7 @@ impl ::re_types_core::Loggable for MarkerShape { Some(10) => Ok(Some(Self::Asterisk)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/marker_size.rs b/crates/store/re_types/src/components/marker_size.rs index a9051d1dfe5f..4f44ca66050d 100644 --- a/crates/store/re_types/src/components/marker_size.rs +++ b/crates/store/re_types/src/components/marker_size.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for MarkerSize { impl ::re_types_core::Loggable for MarkerSize { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for MarkerSize { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/media_type.rs b/crates/store/re_types/src/components/media_type.rs index 938d0325bdf2..fe334105bb42 100644 --- a/crates/store/re_types/src/components/media_type.rs +++ b/crates/store/re_types/src/components/media_type.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for MediaType { impl ::re_types_core::Loggable for MediaType { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,13 +89,13 @@ impl ::re_types_core::Loggable for MediaType { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/name.rs b/crates/store/re_types/src/components/name.rs index ba403152e728..895caa97e92e 100644 --- a/crates/store/re_types/src/components/name.rs +++ b/crates/store/re_types/src/components/name.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Name { impl ::re_types_core::Loggable for Name { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for Name { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/opacity.rs b/crates/store/re_types/src/components/opacity.rs index 7b79c7204f1c..da095c126a63 100644 --- a/crates/store/re_types/src/components/opacity.rs +++ b/crates/store/re_types/src/components/opacity.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for Opacity { impl ::re_types_core::Loggable for Opacity { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for Opacity { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/pinhole_projection.rs b/crates/store/re_types/src/components/pinhole_projection.rs index 66ce2e2f8cba..49fd3921eb6e 100644 --- a/crates/store/re_types/src/components/pinhole_projection.rs +++ b/crates/store/re_types/src/components/pinhole_projection.rs @@ -77,17 +77,17 @@ impl std::ops::DerefMut for PinholeProjection { impl ::re_types_core::Loggable for PinholeProjection { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Mat3x3::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Mat3x3::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Mat3x3::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -95,22 +95,22 @@ impl ::re_types_core::Loggable for PinholeProjection { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow_opt(arrow_data) + crate::datatypes::Mat3x3::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Mat3x3::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs index 7036a92c1ffe..69f3c19db727 100644 --- a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for PoseRotationAxisAngle { impl ::re_types_core::Loggable for PoseRotationAxisAngle { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::RotationAxisAngle::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::RotationAxisAngle::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::RotationAxisAngle::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::RotationAxisAngle::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for PoseRotationAxisAngle { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::RotationAxisAngle::from_arrow_opt(arrow_data) + crate::datatypes::RotationAxisAngle::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/pose_rotation_quat.rs b/crates/store/re_types/src/components/pose_rotation_quat.rs index 335c1b5edcc6..73309d4222df 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for PoseRotationQuat { impl ::re_types_core::Loggable for PoseRotationQuat { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Quaternion::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Quaternion::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Quaternion::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Quaternion::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for PoseRotationQuat { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Quaternion::from_arrow_opt(arrow_data) + crate::datatypes::Quaternion::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Quaternion::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Quaternion::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/pose_scale3d.rs b/crates/store/re_types/src/components/pose_scale3d.rs index 6f8fdd65d638..dc8405122019 100644 --- a/crates/store/re_types/src/components/pose_scale3d.rs +++ b/crates/store/re_types/src/components/pose_scale3d.rs @@ -72,17 +72,17 @@ impl std::ops::DerefMut for PoseScale3D { impl ::re_types_core::Loggable for PoseScale3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -90,22 +90,22 @@ impl ::re_types_core::Loggable for PoseScale3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/pose_transform_mat3x3.rs b/crates/store/re_types/src/components/pose_transform_mat3x3.rs index 3c5b9256d639..3b13194ee2de 100644 --- a/crates/store/re_types/src/components/pose_transform_mat3x3.rs +++ b/crates/store/re_types/src/components/pose_transform_mat3x3.rs @@ -80,17 +80,17 @@ impl std::ops::DerefMut for PoseTransformMat3x3 { impl ::re_types_core::Loggable for PoseTransformMat3x3 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Mat3x3::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Mat3x3::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Mat3x3::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -98,22 +98,22 @@ impl ::re_types_core::Loggable for PoseTransformMat3x3 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow_opt(arrow_data) + crate::datatypes::Mat3x3::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Mat3x3::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/pose_translation3d.rs b/crates/store/re_types/src/components/pose_translation3d.rs index 9d72cf4acf58..58f01f022402 100644 --- a/crates/store/re_types/src/components/pose_translation3d.rs +++ b/crates/store/re_types/src/components/pose_translation3d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for PoseTranslation3D { impl ::re_types_core::Loggable for PoseTranslation3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for PoseTranslation3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/position2d.rs b/crates/store/re_types/src/components/position2d.rs index 38b582ddb3f4..5247e7207ba6 100644 --- a/crates/store/re_types/src/components/position2d.rs +++ b/crates/store/re_types/src/components/position2d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Position2D { impl ::re_types_core::Loggable for Position2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Position2D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow_opt(arrow_data) + crate::datatypes::Vec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec2D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/position3d.rs b/crates/store/re_types/src/components/position3d.rs index f60f59a5e372..5d464f2c5390 100644 --- a/crates/store/re_types/src/components/position3d.rs +++ b/crates/store/re_types/src/components/position3d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Position3D { impl ::re_types_core::Loggable for Position3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Position3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/radius.rs b/crates/store/re_types/src/components/radius.rs index 241e71257936..ef66a5d7a738 100644 --- a/crates/store/re_types/src/components/radius.rs +++ b/crates/store/re_types/src/components/radius.rs @@ -75,17 +75,17 @@ impl std::ops::DerefMut for Radius { impl ::re_types_core::Loggable for Radius { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -93,22 +93,22 @@ impl ::re_types_core::Loggable for Radius { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/range1d.rs b/crates/store/re_types/src/components/range1d.rs index 50b82a1354b2..c432aca259d5 100644 --- a/crates/store/re_types/src/components/range1d.rs +++ b/crates/store/re_types/src/components/range1d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Range1D { impl ::re_types_core::Loggable for Range1D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range1D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Range1D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Range1D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Range1D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Range1D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Range1D::from_arrow_opt(arrow_data) + crate::datatypes::Range1D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Range1D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Range1D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/resolution.rs b/crates/store/re_types/src/components/resolution.rs index bcadde0be16f..d15c3abb2870 100644 --- a/crates/store/re_types/src/components/resolution.rs +++ b/crates/store/re_types/src/components/resolution.rs @@ -69,17 +69,17 @@ impl std::ops::DerefMut for Resolution { impl ::re_types_core::Loggable for Resolution { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -87,22 +87,22 @@ impl ::re_types_core::Loggable for Resolution { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow_opt(arrow_data) + crate::datatypes::Vec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Vec2D::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/rotation_axis_angle.rs b/crates/store/re_types/src/components/rotation_axis_angle.rs index 80330fe35bab..4ffdaf289296 100644 --- a/crates/store/re_types/src/components/rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/rotation_axis_angle.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for RotationAxisAngle { impl ::re_types_core::Loggable for RotationAxisAngle { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::RotationAxisAngle::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::RotationAxisAngle::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::RotationAxisAngle::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::RotationAxisAngle::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for RotationAxisAngle { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::RotationAxisAngle::from_arrow_opt(arrow_data) + crate::datatypes::RotationAxisAngle::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/rotation_quat.rs b/crates/store/re_types/src/components/rotation_quat.rs index 12905957ef5c..b9ab1eb45fb5 100644 --- a/crates/store/re_types/src/components/rotation_quat.rs +++ b/crates/store/re_types/src/components/rotation_quat.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for RotationQuat { impl ::re_types_core::Loggable for RotationQuat { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Quaternion::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Quaternion::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Quaternion::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Quaternion::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for RotationQuat { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Quaternion::from_arrow_opt(arrow_data) + crate::datatypes::Quaternion::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Quaternion::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Quaternion::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/scalar.rs b/crates/store/re_types/src/components/scalar.rs index aa0f455c50a9..724559d4ef71 100644 --- a/crates/store/re_types/src/components/scalar.rs +++ b/crates/store/re_types/src/components/scalar.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for Scalar { impl ::re_types_core::Loggable for Scalar { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float64::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float64::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float64::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float64::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,22 @@ impl ::re_types_core::Loggable for Scalar { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float64::from_arrow_opt(arrow_data) + crate::datatypes::Float64::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float64::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float64::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/scale3d.rs b/crates/store/re_types/src/components/scale3d.rs index 78ab07a8e026..46c4b978b04a 100644 --- a/crates/store/re_types/src/components/scale3d.rs +++ b/crates/store/re_types/src/components/scale3d.rs @@ -72,17 +72,17 @@ impl std::ops::DerefMut for Scale3D { impl ::re_types_core::Loggable for Scale3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -90,22 +90,22 @@ impl ::re_types_core::Loggable for Scale3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/show_labels.rs b/crates/store/re_types/src/components/show_labels.rs index d02798e8c38a..dd5dde88f2c8 100644 --- a/crates/store/re_types/src/components/show_labels.rs +++ b/crates/store/re_types/src/components/show_labels.rs @@ -74,17 +74,17 @@ impl std::ops::DerefMut for ShowLabels { impl ::re_types_core::Loggable for ShowLabels { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -92,13 +92,13 @@ impl ::re_types_core::Loggable for ShowLabels { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/stroke_width.rs b/crates/store/re_types/src/components/stroke_width.rs index 7c4794498d29..d616f092ef56 100644 --- a/crates/store/re_types/src/components/stroke_width.rs +++ b/crates/store/re_types/src/components/stroke_width.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for StrokeWidth { impl ::re_types_core::Loggable for StrokeWidth { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Float32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Float32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Float32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for StrokeWidth { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Float32::from_arrow_opt(arrow_data) + crate::datatypes::Float32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Float32::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Float32::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/tensor_data.rs b/crates/store/re_types/src/components/tensor_data.rs index a23f31c80924..0f9ab55b2abd 100644 --- a/crates/store/re_types/src/components/tensor_data.rs +++ b/crates/store/re_types/src/components/tensor_data.rs @@ -75,17 +75,17 @@ impl std::ops::DerefMut for TensorData { impl ::re_types_core::Loggable for TensorData { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorData::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::TensorData::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::TensorData::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::TensorData::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -93,13 +93,13 @@ impl ::re_types_core::Loggable for TensorData { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::TensorData::from_arrow_opt(arrow_data) + crate::datatypes::TensorData::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/tensor_dimension_index_selection.rs b/crates/store/re_types/src/components/tensor_dimension_index_selection.rs index 359293dc5d1c..ee019e51cd2d 100644 --- a/crates/store/re_types/src/components/tensor_dimension_index_selection.rs +++ b/crates/store/re_types/src/components/tensor_dimension_index_selection.rs @@ -72,17 +72,17 @@ impl std::ops::DerefMut for TensorDimensionIndexSelection { impl ::re_types_core::Loggable for TensorDimensionIndexSelection { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionIndexSelection::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::TensorDimensionIndexSelection::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::TensorDimensionIndexSelection::to_arrow_opt(data.into_iter().map( + crate::datatypes::TensorDimensionIndexSelection::to_arrow2_opt(data.into_iter().map( |datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), @@ -92,13 +92,13 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { )) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::TensorDimensionIndexSelection::from_arrow_opt(arrow_data) + crate::datatypes::TensorDimensionIndexSelection::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/tensor_height_dimension.rs b/crates/store/re_types/src/components/tensor_height_dimension.rs index 344098d2c4cd..d60c7a6717a9 100644 --- a/crates/store/re_types/src/components/tensor_height_dimension.rs +++ b/crates/store/re_types/src/components/tensor_height_dimension.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for TensorHeightDimension { impl ::re_types_core::Loggable for TensorHeightDimension { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionSelection::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::TensorDimensionSelection::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::TensorDimensionSelection::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::TensorDimensionSelection::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for TensorHeightDimension { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::TensorDimensionSelection::from_arrow_opt(arrow_data) + crate::datatypes::TensorDimensionSelection::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/tensor_width_dimension.rs b/crates/store/re_types/src/components/tensor_width_dimension.rs index 3f0225fc2dc6..e54f7fefb461 100644 --- a/crates/store/re_types/src/components/tensor_width_dimension.rs +++ b/crates/store/re_types/src/components/tensor_width_dimension.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for TensorWidthDimension { impl ::re_types_core::Loggable for TensorWidthDimension { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionSelection::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::TensorDimensionSelection::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::TensorDimensionSelection::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::TensorDimensionSelection::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for TensorWidthDimension { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::TensorDimensionSelection::from_arrow_opt(arrow_data) + crate::datatypes::TensorDimensionSelection::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/texcoord2d.rs b/crates/store/re_types/src/components/texcoord2d.rs index 7600e6fa6dc4..0f38f062775e 100644 --- a/crates/store/re_types/src/components/texcoord2d.rs +++ b/crates/store/re_types/src/components/texcoord2d.rs @@ -83,17 +83,17 @@ impl std::ops::DerefMut for Texcoord2D { impl ::re_types_core::Loggable for Texcoord2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -101,22 +101,22 @@ impl ::re_types_core::Loggable for Texcoord2D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow_opt(arrow_data) + crate::datatypes::Vec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec2D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/text.rs b/crates/store/re_types/src/components/text.rs index 3bb4bb31401f..7fcf661cb70e 100644 --- a/crates/store/re_types/src/components/text.rs +++ b/crates/store/re_types/src/components/text.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Text { impl ::re_types_core::Loggable for Text { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for Text { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/text_log_level.rs b/crates/store/re_types/src/components/text_log_level.rs index 0f7dd2fc5212..01613712b317 100644 --- a/crates/store/re_types/src/components/text_log_level.rs +++ b/crates/store/re_types/src/components/text_log_level.rs @@ -76,17 +76,17 @@ impl std::ops::DerefMut for TextLogLevel { impl ::re_types_core::Loggable for TextLogLevel { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Utf8::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Utf8::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Utf8::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -94,13 +94,13 @@ impl ::re_types_core::Loggable for TextLogLevel { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Utf8::from_arrow_opt(arrow_data) + crate::datatypes::Utf8::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/components/transform_mat3x3.rs b/crates/store/re_types/src/components/transform_mat3x3.rs index a81503f38655..fe4f2c19e69f 100644 --- a/crates/store/re_types/src/components/transform_mat3x3.rs +++ b/crates/store/re_types/src/components/transform_mat3x3.rs @@ -80,17 +80,17 @@ impl std::ops::DerefMut for TransformMat3x3 { impl ::re_types_core::Loggable for TransformMat3x3 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Mat3x3::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Mat3x3::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Mat3x3::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -98,22 +98,22 @@ impl ::re_types_core::Loggable for TransformMat3x3 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow_opt(arrow_data) + crate::datatypes::Mat3x3::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Mat3x3::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Mat3x3::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/transform_relation.rs b/crates/store/re_types/src/components/transform_relation.rs index 57f31984b01c..99085cd29840 100644 --- a/crates/store/re_types/src/components/transform_relation.rs +++ b/crates/store/re_types/src/components/transform_relation.rs @@ -83,13 +83,13 @@ impl std::fmt::Display for TransformRelation { impl ::re_types_core::Loggable for TransformRelation { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -113,7 +113,7 @@ impl ::re_types_core::Loggable for TransformRelation { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -121,7 +121,7 @@ impl ::re_types_core::Loggable for TransformRelation { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for TransformRelation { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for TransformRelation { Some(2) => Ok(Some(Self::ChildFromParent)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/translation3d.rs b/crates/store/re_types/src/components/translation3d.rs index d07c575983f0..42f7433fc57f 100644 --- a/crates/store/re_types/src/components/translation3d.rs +++ b/crates/store/re_types/src/components/translation3d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Translation3D { impl ::re_types_core::Loggable for Translation3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Translation3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/triangle_indices.rs b/crates/store/re_types/src/components/triangle_indices.rs index 9412a0a130fe..555f5a0dfa12 100644 --- a/crates/store/re_types/src/components/triangle_indices.rs +++ b/crates/store/re_types/src/components/triangle_indices.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for TriangleIndices { impl ::re_types_core::Loggable for TriangleIndices { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UVec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::UVec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::UVec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::UVec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for TriangleIndices { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::UVec3D::from_arrow_opt(arrow_data) + crate::datatypes::UVec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::UVec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::UVec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/value_range.rs b/crates/store/re_types/src/components/value_range.rs index 7a7ed95828c1..af5633290b85 100644 --- a/crates/store/re_types/src/components/value_range.rs +++ b/crates/store/re_types/src/components/value_range.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for ValueRange { impl ::re_types_core::Loggable for ValueRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range1D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Range1D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Range1D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Range1D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for ValueRange { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Range1D::from_arrow_opt(arrow_data) + crate::datatypes::Range1D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Range1D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Range1D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/vector2d.rs b/crates/store/re_types/src/components/vector2d.rs index 33187fcdeb78..ab040b8a63cd 100644 --- a/crates/store/re_types/src/components/vector2d.rs +++ b/crates/store/re_types/src/components/vector2d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Vector2D { impl ::re_types_core::Loggable for Vector2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec2D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec2D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec2D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Vector2D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow_opt(arrow_data) + crate::datatypes::Vec2D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec2D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec2D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/vector3d.rs b/crates/store/re_types/src/components/vector3d.rs index 26ac8e82edd0..a022b365d7af 100644 --- a/crates/store/re_types/src/components/vector3d.rs +++ b/crates/store/re_types/src/components/vector3d.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for Vector3D { impl ::re_types_core::Loggable for Vector3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Vec3D::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Vec3D::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Vec3D::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for Vector3D { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow_opt(arrow_data) + crate::datatypes::Vec3D::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Vec3D::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::Vec3D::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/components/video_timestamp.rs b/crates/store/re_types/src/components/video_timestamp.rs index 65d16d89293d..54a223baae48 100644 --- a/crates/store/re_types/src/components/video_timestamp.rs +++ b/crates/store/re_types/src/components/video_timestamp.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for VideoTimestamp { impl ::re_types_core::Loggable for VideoTimestamp { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::VideoTimestamp::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::VideoTimestamp::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::VideoTimestamp::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::VideoTimestamp::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for VideoTimestamp { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::VideoTimestamp::from_arrow_opt(arrow_data) + crate::datatypes::VideoTimestamp::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::VideoTimestamp::from_arrow(arrow_data) + crate::datatypes::VideoTimestamp::from_arrow2(arrow_data) .map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types/src/components/view_coordinates.rs b/crates/store/re_types/src/components/view_coordinates.rs index 422cda856412..42277e51927c 100644 --- a/crates/store/re_types/src/components/view_coordinates.rs +++ b/crates/store/re_types/src/components/view_coordinates.rs @@ -88,17 +88,17 @@ impl std::ops::DerefMut for ViewCoordinates { impl ::re_types_core::Loggable for ViewCoordinates { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ViewCoordinates::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::ViewCoordinates::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::ViewCoordinates::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::ViewCoordinates::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -106,22 +106,22 @@ impl ::re_types_core::Loggable for ViewCoordinates { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::ViewCoordinates::from_arrow_opt(arrow_data) + crate::datatypes::ViewCoordinates::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::ViewCoordinates::from_arrow(arrow_data).map(bytemuck::cast_vec) + crate::datatypes::ViewCoordinates::from_arrow2(arrow_data).map(bytemuck::cast_vec) } } diff --git a/crates/store/re_types/src/datatypes/angle.rs b/crates/store/re_types/src/datatypes/angle.rs index 3a6a5d243089..5aaee33ee6a2 100644 --- a/crates/store/re_types/src/datatypes/angle.rs +++ b/crates/store/re_types/src/datatypes/angle.rs @@ -56,13 +56,13 @@ impl From for f32 { impl ::re_types_core::Loggable for Angle { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Float32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -86,7 +86,7 @@ impl ::re_types_core::Loggable for Angle { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), radians.into_iter().map(|v| v.unwrap_or_default()).collect(), radians_bitmap, ) @@ -94,7 +94,7 @@ impl ::re_types_core::Loggable for Angle { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -107,7 +107,7 @@ impl ::re_types_core::Loggable for Angle { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -122,7 +122,7 @@ impl ::re_types_core::Loggable for Angle { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/annotation_info.rs b/crates/store/re_types/src/datatypes/annotation_info.rs index 8a5c0936888b..c22fcd8e61cd 100644 --- a/crates/store/re_types/src/datatypes/annotation_info.rs +++ b/crates/store/re_types/src/datatypes/annotation_info.rs @@ -52,17 +52,17 @@ impl ::re_types_core::SizeBytes for AnnotationInfo { impl ::re_types_core::Loggable for AnnotationInfo { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new("id", DataType::UInt16, false), - Field::new("label", ::arrow_datatype(), true), - Field::new("color", ::arrow_datatype(), true), + Field::new("label", ::arrow2_datatype(), true), + Field::new("color", ::arrow2_datatype(), true), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -85,7 +85,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, id): (Vec<_>, Vec<_>) = data @@ -174,7 +174,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -188,7 +188,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -206,7 +206,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let id = { if !arrays_by_name.contains_key("id") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "id", )) .with_context("rerun.datatypes.AnnotationInfo"); @@ -227,7 +227,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let label = { if !arrays_by_name.contains_key("label") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "label", )) .with_context("rerun.datatypes.AnnotationInfo"); @@ -282,7 +282,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let color = { if !arrays_by_name.contains_key("color") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "color", )) .with_context("rerun.datatypes.AnnotationInfo"); diff --git a/crates/store/re_types/src/datatypes/blob.rs b/crates/store/re_types/src/datatypes/blob.rs index dda608dd1e88..a096e9659f13 100644 --- a/crates/store/re_types/src/datatypes/blob.rs +++ b/crates/store/re_types/src/datatypes/blob.rs @@ -55,7 +55,7 @@ impl From for ::re_types_core::ArrowBuffer { impl ::re_types_core::Loggable for Blob { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( @@ -65,7 +65,7 @@ impl ::re_types_core::Loggable for Blob { ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -105,7 +105,7 @@ impl ::re_types_core::Loggable for Blob { .into(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, PrimitiveArray::new(DataType::UInt8, data0_inner_data, data0_inner_bitmap) .boxed(), @@ -116,7 +116,7 @@ impl ::re_types_core::Loggable for Blob { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -130,7 +130,7 @@ impl ::re_types_core::Loggable for Blob { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/datatypes/channel_datatype.rs b/crates/store/re_types/src/datatypes/channel_datatype.rs index 4a4bff2a7c2a..1e954f350fb0 100644 --- a/crates/store/re_types/src/datatypes/channel_datatype.rs +++ b/crates/store/re_types/src/datatypes/channel_datatype.rs @@ -130,13 +130,13 @@ impl std::fmt::Display for ChannelDatatype { impl ::re_types_core::Loggable for ChannelDatatype { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -160,7 +160,7 @@ impl ::re_types_core::Loggable for ChannelDatatype { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -168,7 +168,7 @@ impl ::re_types_core::Loggable for ChannelDatatype { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -181,7 +181,7 @@ impl ::re_types_core::Loggable for ChannelDatatype { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +202,7 @@ impl ::re_types_core::Loggable for ChannelDatatype { Some(35) => Ok(Some(Self::F64)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/datatypes/class_description.rs b/crates/store/re_types/src/datatypes/class_description.rs index ab0c980cda64..cef0d66baec4 100644 --- a/crates/store/re_types/src/datatypes/class_description.rs +++ b/crates/store/re_types/src/datatypes/class_description.rs @@ -64,20 +64,20 @@ impl ::re_types_core::SizeBytes for ClassDescription { impl ::re_types_core::Loggable for ClassDescription { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "info", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "keypoint_annotations", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -86,7 +86,7 @@ impl ::re_types_core::Loggable for ClassDescription { "keypoint_connections", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -94,7 +94,7 @@ impl ::re_types_core::Loggable for ClassDescription { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -117,7 +117,7 @@ impl ::re_types_core::Loggable for ClassDescription { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, info): (Vec<_>, Vec<_>) = data @@ -133,7 +133,7 @@ impl ::re_types_core::Loggable for ClassDescription { }; { _ = info_bitmap; - crate::datatypes::AnnotationInfo::to_arrow_opt(info)? + crate::datatypes::AnnotationInfo::to_arrow2_opt(info)? } }, { @@ -168,13 +168,13 @@ impl ::re_types_core::Loggable for ClassDescription { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), offsets, { _ = keypoint_annotations_inner_bitmap; - crate::datatypes::AnnotationInfo::to_arrow_opt( + crate::datatypes::AnnotationInfo::to_arrow2_opt( keypoint_annotations_inner_data.into_iter().map(Some), )? }, @@ -215,13 +215,13 @@ impl ::re_types_core::Loggable for ClassDescription { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), offsets, { _ = keypoint_connections_inner_bitmap; - crate::datatypes::KeypointPair::to_arrow_opt( + crate::datatypes::KeypointPair::to_arrow2_opt( keypoint_connections_inner_data.into_iter().map(Some), )? }, @@ -237,7 +237,7 @@ impl ::re_types_core::Loggable for ClassDescription { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -251,7 +251,7 @@ impl ::re_types_core::Loggable for ClassDescription { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -269,20 +269,20 @@ impl ::re_types_core::Loggable for ClassDescription { let info = { if !arrays_by_name.contains_key("info") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "info", )) .with_context("rerun.datatypes.ClassDescription"); } let arrow_data = &**arrays_by_name["info"]; - crate::datatypes::AnnotationInfo::from_arrow_opt(arrow_data) + crate::datatypes::AnnotationInfo::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.ClassDescription#info")? .into_iter() }; let keypoint_annotations = { if !arrays_by_name.contains_key("keypoint_annotations") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "keypoint_annotations", )) .with_context("rerun.datatypes.ClassDescription"); @@ -295,7 +295,7 @@ impl ::re_types_core::Loggable for ClassDescription { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -309,7 +309,7 @@ impl ::re_types_core::Loggable for ClassDescription { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::datatypes::AnnotationInfo::from_arrow_opt(arrow_data_inner) + crate::datatypes::AnnotationInfo::from_arrow2_opt(arrow_data_inner) .with_context( "rerun.datatypes.ClassDescription#keypoint_annotations", )? @@ -352,7 +352,7 @@ impl ::re_types_core::Loggable for ClassDescription { let keypoint_connections = { if !arrays_by_name.contains_key("keypoint_connections") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "keypoint_connections", )) .with_context("rerun.datatypes.ClassDescription"); @@ -365,7 +365,7 @@ impl ::re_types_core::Loggable for ClassDescription { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -379,7 +379,7 @@ impl ::re_types_core::Loggable for ClassDescription { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::datatypes::KeypointPair::from_arrow_opt(arrow_data_inner) + crate::datatypes::KeypointPair::from_arrow2_opt(arrow_data_inner) .with_context( "rerun.datatypes.ClassDescription#keypoint_connections", )? diff --git a/crates/store/re_types/src/datatypes/class_description_map_elem.rs b/crates/store/re_types/src/datatypes/class_description_map_elem.rs index bffd52d956d0..cbef4b8addb8 100644 --- a/crates/store/re_types/src/datatypes/class_description_map_elem.rs +++ b/crates/store/re_types/src/datatypes/class_description_map_elem.rs @@ -46,24 +46,24 @@ impl ::re_types_core::SizeBytes for ClassDescriptionMapElem { impl ::re_types_core::Loggable for ClassDescriptionMapElem { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "class_id", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "class_description", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -86,7 +86,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, class_id): (Vec<_>, Vec<_>) = data @@ -125,7 +125,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { }; { _ = class_description_bitmap; - crate::datatypes::ClassDescription::to_arrow_opt(class_description)? + crate::datatypes::ClassDescription::to_arrow2_opt(class_description)? } }, ], @@ -135,7 +135,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -149,7 +149,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -167,7 +167,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { let class_id = { if !arrays_by_name.contains_key("class_id") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "class_id", )) .with_context("rerun.datatypes.ClassDescriptionMapElem"); @@ -189,13 +189,13 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { let class_description = { if !arrays_by_name.contains_key("class_description") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "class_description", )) .with_context("rerun.datatypes.ClassDescriptionMapElem"); } let arrow_data = &**arrays_by_name["class_description"]; - crate::datatypes::ClassDescription::from_arrow_opt(arrow_data) + crate::datatypes::ClassDescription::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.ClassDescriptionMapElem#class_description")? .into_iter() }; diff --git a/crates/store/re_types/src/datatypes/class_id.rs b/crates/store/re_types/src/datatypes/class_id.rs index 62c6eba85e21..94439d6a92de 100644 --- a/crates/store/re_types/src/datatypes/class_id.rs +++ b/crates/store/re_types/src/datatypes/class_id.rs @@ -68,13 +68,13 @@ impl From for u16 { impl ::re_types_core::Loggable for ClassId { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt16 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -98,7 +98,7 @@ impl ::re_types_core::Loggable for ClassId { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for ClassId { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -119,7 +119,7 @@ impl ::re_types_core::Loggable for ClassId { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for ClassId { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/color_model.rs b/crates/store/re_types/src/datatypes/color_model.rs index a9dd2aaa1ff9..108d7b94c158 100644 --- a/crates/store/re_types/src/datatypes/color_model.rs +++ b/crates/store/re_types/src/datatypes/color_model.rs @@ -92,13 +92,13 @@ impl std::fmt::Display for ColorModel { impl ::re_types_core::Loggable for ColorModel { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -122,7 +122,7 @@ impl ::re_types_core::Loggable for ColorModel { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -130,7 +130,7 @@ impl ::re_types_core::Loggable for ColorModel { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -143,7 +143,7 @@ impl ::re_types_core::Loggable for ColorModel { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +158,7 @@ impl ::re_types_core::Loggable for ColorModel { Some(5) => Ok(Some(Self::BGRA)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/datatypes/dvec2d.rs b/crates/store/re_types/src/datatypes/dvec2d.rs index 88feeaa89eef..e71b04b8c598 100644 --- a/crates/store/re_types/src/datatypes/dvec2d.rs +++ b/crates/store/re_types/src/datatypes/dvec2d.rs @@ -53,7 +53,7 @@ impl From for [f64; 2usize] { impl ::re_types_core::Loggable for DVec2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for DVec2D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for DVec2D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float64, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for DVec2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for DVec2D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for DVec2D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/image_format.rs b/crates/store/re_types/src/datatypes/image_format.rs index fb7c7da0a036..c0e797e81234 100644 --- a/crates/store/re_types/src/datatypes/image_format.rs +++ b/crates/store/re_types/src/datatypes/image_format.rs @@ -67,7 +67,7 @@ impl ::re_types_core::SizeBytes for ImageFormat { impl ::re_types_core::Loggable for ImageFormat { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -75,23 +75,23 @@ impl ::re_types_core::Loggable for ImageFormat { Field::new("height", DataType::UInt32, false), Field::new( "pixel_format", - ::arrow_datatype(), + ::arrow2_datatype(), true, ), Field::new( "color_model", - ::arrow_datatype(), + ::arrow2_datatype(), true, ), Field::new( "channel_datatype", - ::arrow_datatype(), + ::arrow2_datatype(), true, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -114,7 +114,7 @@ impl ::re_types_core::Loggable for ImageFormat { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, width): (Vec<_>, Vec<_>) = data @@ -171,7 +171,7 @@ impl ::re_types_core::Loggable for ImageFormat { }; { _ = pixel_format_bitmap; - crate::datatypes::PixelFormat::to_arrow_opt(pixel_format)? + crate::datatypes::PixelFormat::to_arrow2_opt(pixel_format)? } }, { @@ -191,7 +191,7 @@ impl ::re_types_core::Loggable for ImageFormat { }; { _ = color_model_bitmap; - crate::datatypes::ColorModel::to_arrow_opt(color_model)? + crate::datatypes::ColorModel::to_arrow2_opt(color_model)? } }, { @@ -211,7 +211,7 @@ impl ::re_types_core::Loggable for ImageFormat { }; { _ = channel_datatype_bitmap; - crate::datatypes::ChannelDatatype::to_arrow_opt(channel_datatype)? + crate::datatypes::ChannelDatatype::to_arrow2_opt(channel_datatype)? } }, ], @@ -221,7 +221,7 @@ impl ::re_types_core::Loggable for ImageFormat { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -235,7 +235,7 @@ impl ::re_types_core::Loggable for ImageFormat { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -253,7 +253,7 @@ impl ::re_types_core::Loggable for ImageFormat { let width = { if !arrays_by_name.contains_key("width") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "width", )) .with_context("rerun.datatypes.ImageFormat"); @@ -274,7 +274,7 @@ impl ::re_types_core::Loggable for ImageFormat { let height = { if !arrays_by_name.contains_key("height") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "height", )) .with_context("rerun.datatypes.ImageFormat"); @@ -295,39 +295,39 @@ impl ::re_types_core::Loggable for ImageFormat { let pixel_format = { if !arrays_by_name.contains_key("pixel_format") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "pixel_format", )) .with_context("rerun.datatypes.ImageFormat"); } let arrow_data = &**arrays_by_name["pixel_format"]; - crate::datatypes::PixelFormat::from_arrow_opt(arrow_data) + crate::datatypes::PixelFormat::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.ImageFormat#pixel_format")? .into_iter() }; let color_model = { if !arrays_by_name.contains_key("color_model") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "color_model", )) .with_context("rerun.datatypes.ImageFormat"); } let arrow_data = &**arrays_by_name["color_model"]; - crate::datatypes::ColorModel::from_arrow_opt(arrow_data) + crate::datatypes::ColorModel::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.ImageFormat#color_model")? .into_iter() }; let channel_datatype = { if !arrays_by_name.contains_key("channel_datatype") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "channel_datatype", )) .with_context("rerun.datatypes.ImageFormat"); } let arrow_data = &**arrays_by_name["channel_datatype"]; - crate::datatypes::ChannelDatatype::from_arrow_opt(arrow_data) + crate::datatypes::ChannelDatatype::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.ImageFormat#channel_datatype")? .into_iter() }; diff --git a/crates/store/re_types/src/datatypes/keypoint_id.rs b/crates/store/re_types/src/datatypes/keypoint_id.rs index 021cddb15a3f..aad03ec46a9d 100644 --- a/crates/store/re_types/src/datatypes/keypoint_id.rs +++ b/crates/store/re_types/src/datatypes/keypoint_id.rs @@ -70,13 +70,13 @@ impl From for u16 { impl ::re_types_core::Loggable for KeypointId { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt16 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -100,7 +100,7 @@ impl ::re_types_core::Loggable for KeypointId { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -108,7 +108,7 @@ impl ::re_types_core::Loggable for KeypointId { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -121,7 +121,7 @@ impl ::re_types_core::Loggable for KeypointId { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -136,7 +136,7 @@ impl ::re_types_core::Loggable for KeypointId { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/keypoint_pair.rs b/crates/store/re_types/src/datatypes/keypoint_pair.rs index 53e36fefaf20..3804c96c2a8e 100644 --- a/crates/store/re_types/src/datatypes/keypoint_pair.rs +++ b/crates/store/re_types/src/datatypes/keypoint_pair.rs @@ -44,24 +44,24 @@ impl ::re_types_core::SizeBytes for KeypointPair { impl ::re_types_core::Loggable for KeypointPair { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "keypoint0", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "keypoint1", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -84,7 +84,7 @@ impl ::re_types_core::Loggable for KeypointPair { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, keypoint0): (Vec<_>, Vec<_>) = data @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for KeypointPair { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -151,7 +151,7 @@ impl ::re_types_core::Loggable for KeypointPair { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -169,7 +169,7 @@ impl ::re_types_core::Loggable for KeypointPair { let keypoint0 = { if !arrays_by_name.contains_key("keypoint0") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "keypoint0", )) .with_context("rerun.datatypes.KeypointPair"); @@ -191,7 +191,7 @@ impl ::re_types_core::Loggable for KeypointPair { let keypoint1 = { if !arrays_by_name.contains_key("keypoint1") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "keypoint1", )) .with_context("rerun.datatypes.KeypointPair"); diff --git a/crates/store/re_types/src/datatypes/mat3x3.rs b/crates/store/re_types/src/datatypes/mat3x3.rs index 0d1fba45f192..a3d1fb634979 100644 --- a/crates/store/re_types/src/datatypes/mat3x3.rs +++ b/crates/store/re_types/src/datatypes/mat3x3.rs @@ -65,7 +65,7 @@ impl From for [f32; 9usize] { impl ::re_types_core::Loggable for Mat3x3 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -74,7 +74,7 @@ impl ::re_types_core::Loggable for Mat3x3 { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for Mat3x3 { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for Mat3x3 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for Mat3x3 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -208,7 +208,7 @@ impl ::re_types_core::Loggable for Mat3x3 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/mat4x4.rs b/crates/store/re_types/src/datatypes/mat4x4.rs index 495a22530749..350ce32fe103 100644 --- a/crates/store/re_types/src/datatypes/mat4x4.rs +++ b/crates/store/re_types/src/datatypes/mat4x4.rs @@ -65,7 +65,7 @@ impl From for [f32; 16usize] { impl ::re_types_core::Loggable for Mat4x4 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -74,7 +74,7 @@ impl ::re_types_core::Loggable for Mat4x4 { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for Mat4x4 { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for Mat4x4 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for Mat4x4 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -208,7 +208,7 @@ impl ::re_types_core::Loggable for Mat4x4 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/pixel_format.rs b/crates/store/re_types/src/datatypes/pixel_format.rs index 7ae785bfd107..c79a03bd7bb1 100644 --- a/crates/store/re_types/src/datatypes/pixel_format.rs +++ b/crates/store/re_types/src/datatypes/pixel_format.rs @@ -212,13 +212,13 @@ impl std::fmt::Display for PixelFormat { impl ::re_types_core::Loggable for PixelFormat { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -242,7 +242,7 @@ impl ::re_types_core::Loggable for PixelFormat { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -250,7 +250,7 @@ impl ::re_types_core::Loggable for PixelFormat { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -263,7 +263,7 @@ impl ::re_types_core::Loggable for PixelFormat { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -283,7 +283,7 @@ impl ::re_types_core::Loggable for PixelFormat { Some(50) => Ok(Some(Self::Y_U_V16_FullRange)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/datatypes/quaternion.rs b/crates/store/re_types/src/datatypes/quaternion.rs index f2dc9dfbd4da..11fee5d0a2f4 100644 --- a/crates/store/re_types/src/datatypes/quaternion.rs +++ b/crates/store/re_types/src/datatypes/quaternion.rs @@ -56,7 +56,7 @@ impl From for [f32; 4usize] { impl ::re_types_core::Loggable for Quaternion { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -65,7 +65,7 @@ impl ::re_types_core::Loggable for Quaternion { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for Quaternion { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -123,7 +123,7 @@ impl ::re_types_core::Loggable for Quaternion { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for Quaternion { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -199,7 +199,7 @@ impl ::re_types_core::Loggable for Quaternion { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/range1d.rs b/crates/store/re_types/src/datatypes/range1d.rs index 7fe8284a96f3..8fbeaccbbea8 100644 --- a/crates/store/re_types/src/datatypes/range1d.rs +++ b/crates/store/re_types/src/datatypes/range1d.rs @@ -53,7 +53,7 @@ impl From for [f64; 2usize] { impl ::re_types_core::Loggable for Range1D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for Range1D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for Range1D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float64, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for Range1D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for Range1D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for Range1D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/range2d.rs b/crates/store/re_types/src/datatypes/range2d.rs index 6ff2b5c2a794..8be89ea107d0 100644 --- a/crates/store/re_types/src/datatypes/range2d.rs +++ b/crates/store/re_types/src/datatypes/range2d.rs @@ -45,24 +45,24 @@ impl ::re_types_core::SizeBytes for Range2D { impl ::re_types_core::Loggable for Range2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "x_range", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "y_range", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -85,7 +85,7 @@ impl ::re_types_core::Loggable for Range2D { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, x_range): (Vec<_>, Vec<_>) = data @@ -190,7 +190,7 @@ impl ::re_types_core::Loggable for Range2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -204,7 +204,7 @@ impl ::re_types_core::Loggable for Range2D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -222,7 +222,7 @@ impl ::re_types_core::Loggable for Range2D { let x_range = { if !arrays_by_name.contains_key("x_range") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "x_range", )) .with_context("rerun.datatypes.Range2D"); @@ -303,7 +303,7 @@ impl ::re_types_core::Loggable for Range2D { let y_range = { if !arrays_by_name.contains_key("y_range") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "y_range", )) .with_context("rerun.datatypes.Range2D"); diff --git a/crates/store/re_types/src/datatypes/rgba32.rs b/crates/store/re_types/src/datatypes/rgba32.rs index 334794cd573c..52cd92e38f15 100644 --- a/crates/store/re_types/src/datatypes/rgba32.rs +++ b/crates/store/re_types/src/datatypes/rgba32.rs @@ -58,13 +58,13 @@ impl From for u32 { impl ::re_types_core::Loggable for Rgba32 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -88,7 +88,7 @@ impl ::re_types_core::Loggable for Rgba32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -96,7 +96,7 @@ impl ::re_types_core::Loggable for Rgba32 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for Rgba32 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for Rgba32 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs index 9a0bf318414c..408bd47cec27 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs @@ -48,16 +48,16 @@ impl ::re_types_core::SizeBytes for RotationAxisAngle { impl ::re_types_core::Loggable for RotationAxisAngle { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ - Field::new("axis", ::arrow_datatype(), false), - Field::new("angle", ::arrow_datatype(), false), + Field::new("axis", ::arrow2_datatype(), false), + Field::new("angle", ::arrow2_datatype(), false), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -80,7 +80,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, axis): (Vec<_>, Vec<_>) = data @@ -159,7 +159,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -173,7 +173,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -191,7 +191,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { let axis = { if !arrays_by_name.contains_key("axis") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "axis", )) .with_context("rerun.datatypes.RotationAxisAngle"); @@ -271,7 +271,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { let angle = { if !arrays_by_name.contains_key("angle") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "angle", )) .with_context("rerun.datatypes.RotationAxisAngle"); diff --git a/crates/store/re_types/src/datatypes/tensor_buffer.rs b/crates/store/re_types/src/datatypes/tensor_buffer.rs index 217d0e0216a3..ac2a9ea6a8d2 100644 --- a/crates/store/re_types/src/datatypes/tensor_buffer.rs +++ b/crates/store/re_types/src/datatypes/tensor_buffer.rs @@ -96,7 +96,7 @@ impl ::re_types_core::SizeBytes for TensorBuffer { impl ::re_types_core::Loggable for TensorBuffer { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Union( @@ -209,7 +209,7 @@ impl ::re_types_core::Loggable for TensorBuffer { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -734,11 +734,11 @@ impl ::re_types_core::Loggable for TensorBuffer { }) .collect() }); - UnionArray::new(Self::arrow_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -752,7 +752,7 @@ impl ::re_types_core::Loggable for TensorBuffer { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -765,7 +765,7 @@ impl ::re_types_core::Loggable for TensorBuffer { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -1701,7 +1701,7 @@ impl ::re_types_core::Loggable for TensorBuffer { }), _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", *typ as _, )); diff --git a/crates/store/re_types/src/datatypes/tensor_data.rs b/crates/store/re_types/src/datatypes/tensor_data.rs index 54b901c239d8..d499b8d09cc3 100644 --- a/crates/store/re_types/src/datatypes/tensor_data.rs +++ b/crates/store/re_types/src/datatypes/tensor_data.rs @@ -52,7 +52,7 @@ impl ::re_types_core::SizeBytes for TensorData { impl ::re_types_core::Loggable for TensorData { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -60,20 +60,20 @@ impl ::re_types_core::Loggable for TensorData { "shape", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, ), Field::new( "buffer", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -96,7 +96,7 @@ impl ::re_types_core::Loggable for TensorData { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, shape): (Vec<_>, Vec<_>) = data @@ -124,13 +124,13 @@ impl ::re_types_core::Loggable for TensorData { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), offsets, { _ = shape_inner_bitmap; - crate::datatypes::TensorDimension::to_arrow_opt( + crate::datatypes::TensorDimension::to_arrow2_opt( shape_inner_data.into_iter().map(Some), )? }, @@ -153,7 +153,7 @@ impl ::re_types_core::Loggable for TensorData { }; { _ = buffer_bitmap; - crate::datatypes::TensorBuffer::to_arrow_opt(buffer)? + crate::datatypes::TensorBuffer::to_arrow2_opt(buffer)? } }, ], @@ -163,7 +163,7 @@ impl ::re_types_core::Loggable for TensorData { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -177,7 +177,7 @@ impl ::re_types_core::Loggable for TensorData { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -195,7 +195,7 @@ impl ::re_types_core::Loggable for TensorData { let shape = { if !arrays_by_name.contains_key("shape") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "shape", )) .with_context("rerun.datatypes.TensorData"); @@ -208,7 +208,7 @@ impl ::re_types_core::Loggable for TensorData { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -220,7 +220,7 @@ impl ::re_types_core::Loggable for TensorData { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::datatypes::TensorDimension::from_arrow_opt(arrow_data_inner) + crate::datatypes::TensorDimension::from_arrow2_opt(arrow_data_inner) .with_context("rerun.datatypes.TensorData#shape")? .into_iter() .collect::>() @@ -261,13 +261,13 @@ impl ::re_types_core::Loggable for TensorData { let buffer = { if !arrays_by_name.contains_key("buffer") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "buffer", )) .with_context("rerun.datatypes.TensorData"); } let arrow_data = &**arrays_by_name["buffer"]; - crate::datatypes::TensorBuffer::from_arrow_opt(arrow_data) + crate::datatypes::TensorBuffer::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.TensorData#buffer")? .into_iter() }; diff --git a/crates/store/re_types/src/datatypes/tensor_dimension.rs b/crates/store/re_types/src/datatypes/tensor_dimension.rs index 392fac41b454..318c039f3ee5 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension.rs @@ -44,7 +44,7 @@ impl ::re_types_core::SizeBytes for TensorDimension { impl ::re_types_core::Loggable for TensorDimension { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -53,7 +53,7 @@ impl ::re_types_core::Loggable for TensorDimension { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -76,7 +76,7 @@ impl ::re_types_core::Loggable for TensorDimension { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, size): (Vec<_>, Vec<_>) = data @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for TensorDimension { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -151,7 +151,7 @@ impl ::re_types_core::Loggable for TensorDimension { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -169,7 +169,7 @@ impl ::re_types_core::Loggable for TensorDimension { let size = { if !arrays_by_name.contains_key("size") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "size", )) .with_context("rerun.datatypes.TensorDimension"); @@ -190,7 +190,7 @@ impl ::re_types_core::Loggable for TensorDimension { let name = { if !arrays_by_name.contains_key("name") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "name", )) .with_context("rerun.datatypes.TensorDimension"); diff --git a/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs b/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs index 722771a877b6..280ca3e7149b 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension_index_selection.rs @@ -46,7 +46,7 @@ impl ::re_types_core::SizeBytes for TensorDimensionIndexSelection { impl ::re_types_core::Loggable for TensorDimensionIndexSelection { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -55,7 +55,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -78,7 +78,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, dimension): (Vec<_>, Vec<_>) = data @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -142,7 +142,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,7 +160,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "dimension", )) .with_context("rerun.datatypes.TensorDimensionIndexSelection"); @@ -181,7 +181,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { let index = { if !arrays_by_name.contains_key("index") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "index", )) .with_context("rerun.datatypes.TensorDimensionIndexSelection"); diff --git a/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs b/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs index 389b7729daf9..bd1282936748 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs @@ -44,7 +44,7 @@ impl ::re_types_core::SizeBytes for TensorDimensionSelection { impl ::re_types_core::Loggable for TensorDimensionSelection { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -53,7 +53,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -76,7 +76,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, dimension): (Vec<_>, Vec<_>) = data @@ -126,7 +126,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -140,7 +140,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +158,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "dimension", )) .with_context("rerun.datatypes.TensorDimensionSelection"); @@ -179,7 +179,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { let invert = { if !arrays_by_name.contains_key("invert") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "invert", )) .with_context("rerun.datatypes.TensorDimensionSelection"); diff --git a/crates/store/re_types/src/datatypes/uuid.rs b/crates/store/re_types/src/datatypes/uuid.rs index 880430630bf4..f41e29c51595 100644 --- a/crates/store/re_types/src/datatypes/uuid.rs +++ b/crates/store/re_types/src/datatypes/uuid.rs @@ -56,7 +56,7 @@ impl From for [u8; 16usize] { impl ::re_types_core::Loggable for Uuid { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -65,7 +65,7 @@ impl ::re_types_core::Loggable for Uuid { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for Uuid { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::UInt8, bytes_inner_data.into_iter().collect(), @@ -123,7 +123,7 @@ impl ::re_types_core::Loggable for Uuid { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for Uuid { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -199,7 +199,7 @@ impl ::re_types_core::Loggable for Uuid { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/uvec2d.rs b/crates/store/re_types/src/datatypes/uvec2d.rs index 8947ce6e84d5..9f81c4d61dc1 100644 --- a/crates/store/re_types/src/datatypes/uvec2d.rs +++ b/crates/store/re_types/src/datatypes/uvec2d.rs @@ -53,7 +53,7 @@ impl From for [u32; 2usize] { impl ::re_types_core::Loggable for UVec2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for UVec2D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for UVec2D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::UInt32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for UVec2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for UVec2D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for UVec2D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/uvec3d.rs b/crates/store/re_types/src/datatypes/uvec3d.rs index 9eaf0cf6de97..ab4fde287986 100644 --- a/crates/store/re_types/src/datatypes/uvec3d.rs +++ b/crates/store/re_types/src/datatypes/uvec3d.rs @@ -53,7 +53,7 @@ impl From for [u32; 3usize] { impl ::re_types_core::Loggable for UVec3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for UVec3D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for UVec3D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::UInt32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for UVec3D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for UVec3D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for UVec3D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/uvec4d.rs b/crates/store/re_types/src/datatypes/uvec4d.rs index 8bd1aaf9c07d..495401097a51 100644 --- a/crates/store/re_types/src/datatypes/uvec4d.rs +++ b/crates/store/re_types/src/datatypes/uvec4d.rs @@ -53,7 +53,7 @@ impl From for [u32; 4usize] { impl ::re_types_core::Loggable for UVec4D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for UVec4D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for UVec4D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::UInt32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for UVec4D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for UVec4D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for UVec4D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/vec2d.rs b/crates/store/re_types/src/datatypes/vec2d.rs index 7e51b9111549..326cb38ce663 100644 --- a/crates/store/re_types/src/datatypes/vec2d.rs +++ b/crates/store/re_types/src/datatypes/vec2d.rs @@ -53,7 +53,7 @@ impl From for [f32; 2usize] { impl ::re_types_core::Loggable for Vec2D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for Vec2D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for Vec2D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for Vec2D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for Vec2D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for Vec2D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/vec3d.rs b/crates/store/re_types/src/datatypes/vec3d.rs index aa458ef63c1b..2c3136fbb92f 100644 --- a/crates/store/re_types/src/datatypes/vec3d.rs +++ b/crates/store/re_types/src/datatypes/vec3d.rs @@ -53,7 +53,7 @@ impl From for [f32; 3usize] { impl ::re_types_core::Loggable for Vec3D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for Vec3D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for Vec3D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for Vec3D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for Vec3D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for Vec3D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/vec4d.rs b/crates/store/re_types/src/datatypes/vec4d.rs index 3a0078ae8f5d..2b9769705843 100644 --- a/crates/store/re_types/src/datatypes/vec4d.rs +++ b/crates/store/re_types/src/datatypes/vec4d.rs @@ -53,7 +53,7 @@ impl From for [f32; 4usize] { impl ::re_types_core::Loggable for Vec4D { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -62,7 +62,7 @@ impl ::re_types_core::Loggable for Vec4D { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -106,7 +106,7 @@ impl ::re_types_core::Loggable for Vec4D { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::Float32, data0_inner_data.into_iter().collect(), @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for Vec4D { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for Vec4D { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -196,7 +196,7 @@ impl ::re_types_core::Loggable for Vec4D { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/video_timestamp.rs b/crates/store/re_types/src/datatypes/video_timestamp.rs index fc8c8918fca4..daf22dc0fe8f 100644 --- a/crates/store/re_types/src/datatypes/video_timestamp.rs +++ b/crates/store/re_types/src/datatypes/video_timestamp.rs @@ -58,13 +58,13 @@ impl From for i64 { impl ::re_types_core::Loggable for VideoTimestamp { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Int64 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -88,7 +88,7 @@ impl ::re_types_core::Loggable for VideoTimestamp { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -96,7 +96,7 @@ impl ::re_types_core::Loggable for VideoTimestamp { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for VideoTimestamp { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +124,7 @@ impl ::re_types_core::Loggable for VideoTimestamp { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/datatypes/view_coordinates.rs b/crates/store/re_types/src/datatypes/view_coordinates.rs index 18b7e4db7907..4345ebcfa835 100644 --- a/crates/store/re_types/src/datatypes/view_coordinates.rs +++ b/crates/store/re_types/src/datatypes/view_coordinates.rs @@ -73,7 +73,7 @@ impl From for [u8; 3usize] { impl ::re_types_core::Loggable for ViewCoordinates { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::FixedSizeList( @@ -82,7 +82,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -126,7 +126,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { .into() }); FixedSizeListArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), PrimitiveArray::new( DataType::UInt8, data0_inner_data.into_iter().collect(), @@ -140,7 +140,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -154,7 +154,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -216,7 +216,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs index 326db0114f6e..9c6170f08304 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer1.rs @@ -209,7 +209,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -223,7 +223,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer1") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1001")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1001")? .into_iter() .next() @@ -236,7 +236,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer2") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1002")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1002")? .into_iter() .next() @@ -249,7 +249,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer3") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1003")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1003")? .into_iter() .next() @@ -262,7 +262,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer4") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1004")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1004")? .into_iter() .next() @@ -275,7 +275,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer5") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1005")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1005")? .into_iter() .next() @@ -288,7 +288,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer6") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1006")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1006")? .into_iter() .next() @@ -301,7 +301,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer7") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1007")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1007")? .into_iter() .next() @@ -314,7 +314,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer8") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1008")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1008")? .into_iter() .next() @@ -327,7 +327,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer9") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1009")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1009")? .into_iter() .next() @@ -340,7 +340,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer10") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1010")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1010")? .into_iter() .next() @@ -353,7 +353,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer11") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1011")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1011")? .into_iter() .next() @@ -366,7 +366,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer12") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1012")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1012")? .into_iter() .next() @@ -379,7 +379,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer13") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1013")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1013")? .into_iter() .next() @@ -392,7 +392,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer14") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1014")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1014")? .into_iter() .next() @@ -405,7 +405,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer15") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1015")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1015")? .into_iter() .next() @@ -418,7 +418,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer16") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1016")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1016")? .into_iter() .next() @@ -431,7 +431,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer17") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1017")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1017")? .into_iter() .next() @@ -444,7 +444,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer18") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1018")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1018")? .into_iter() .next() @@ -457,7 +457,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer19") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1019")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1019")? .into_iter() .next() @@ -470,7 +470,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer20") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1020")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1020")? .into_iter() .next() @@ -483,7 +483,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer21") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1021")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1021")? .into_iter() .next() @@ -496,7 +496,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { .get("rerun.testing.components.AffixFuzzer22") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1022")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer1#fuzz1022")? .into_iter() .next() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs index 6c1059613b02..4132525fad07 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer2.rs @@ -194,7 +194,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -208,7 +208,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer1") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1101")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1101")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -220,7 +220,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer2") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1102")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1102")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -232,7 +232,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer3") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1103")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1103")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -244,7 +244,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer4") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1104")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1104")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -256,7 +256,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer5") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1105")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1105")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -268,7 +268,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer6") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1106")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1106")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -280,7 +280,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer7") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1107")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1107")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -292,7 +292,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer8") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1108")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1108")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -304,7 +304,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer9") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1109")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1109")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -316,7 +316,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer10") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1110")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1110")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -328,7 +328,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer11") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1111")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1111")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -340,7 +340,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer12") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1112")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1112")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -352,7 +352,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer13") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1113")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1113")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -364,7 +364,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer14") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1114")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1114")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -376,7 +376,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer15") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1115")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1115")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -388,7 +388,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer16") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1116")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1116")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -400,7 +400,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer17") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1117")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1117")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -412,7 +412,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer18") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1118")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1118")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -424,7 +424,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { .get("rerun.testing.components.AffixFuzzer22") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1122")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer2#fuzz1122")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs index 635465327faf..43efcb3de5a3 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer3.rs @@ -189,7 +189,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -200,7 +200,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { .collect(); let fuzz2001 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer1") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2001")? .into_iter() .next() @@ -210,7 +210,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2002 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer2") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2002")? .into_iter() .next() @@ -220,7 +220,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2003 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer3") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2003")? .into_iter() .next() @@ -230,7 +230,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2004 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer4") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2004")? .into_iter() .next() @@ -240,7 +240,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2005 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer5") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2005")? .into_iter() .next() @@ -250,7 +250,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2006 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer6") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2006")? .into_iter() .next() @@ -260,7 +260,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2007 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer7") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2007")? .into_iter() .next() @@ -270,7 +270,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2008 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer8") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2008")? .into_iter() .next() @@ -280,7 +280,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2009 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer9") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2009")? .into_iter() .next() @@ -290,7 +290,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2010 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer10") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2010")? .into_iter() .next() @@ -300,7 +300,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2011 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer11") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2011")? .into_iter() .next() @@ -310,7 +310,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2012 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer12") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2012")? .into_iter() .next() @@ -320,7 +320,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2013 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer13") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2013")? .into_iter() .next() @@ -330,7 +330,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2014 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer14") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2014")? .into_iter() .next() @@ -340,7 +340,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2015 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer15") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2015")? .into_iter() .next() @@ -350,7 +350,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2016 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer16") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2016")? .into_iter() .next() @@ -360,7 +360,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2017 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer17") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2017")? .into_iter() .next() @@ -370,7 +370,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { }; let fuzz2018 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer18") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer3#fuzz2018")? .into_iter() .next() diff --git a/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs b/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs index 82e34f576253..9d5b71b91a8f 100644 --- a/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/archetypes/affix_fuzzer4.rs @@ -189,7 +189,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -201,7 +201,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2101 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer1") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2101")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -214,7 +214,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2102 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer2") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2102")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -227,7 +227,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2103 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer3") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2103")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -240,7 +240,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2104 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer4") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2104")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -253,7 +253,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2105 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer5") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2105")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -266,7 +266,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2106 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer6") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2106")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -279,7 +279,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2107 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer7") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2107")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -292,7 +292,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2108 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer8") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2108")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -305,7 +305,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2109 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer9") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2109")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -318,7 +318,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2110 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer10") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2110")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -331,7 +331,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2111 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer11") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2111")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -344,7 +344,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2112 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer12") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2112")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -357,7 +357,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2113 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer13") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2113")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -370,7 +370,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2114 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer14") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2114")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -383,7 +383,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2115 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer15") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2115")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -396,7 +396,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2116 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer16") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2116")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -409,7 +409,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2117 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer17") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2117")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -422,7 +422,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { let fuzz2118 = if let Some(array) = arrays_by_name.get("rerun.testing.components.AffixFuzzer18") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.testing.archetypes.AffixFuzzer4#fuzz2118")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer1.rs b/crates/store/re_types/src/testing/components/affix_fuzzer1.rs index 7b7eb6231af4..f2b41d2a1bf6 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer1.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer1 { impl ::re_types_core::Loggable for AffixFuzzer1 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } 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 089ea46944d6..1c37ed8e1dd0 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs @@ -67,13 +67,13 @@ impl std::ops::DerefMut for AffixFuzzer10 { impl ::re_types_core::Loggable for AffixFuzzer10 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Utf8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, inner_data, data0_bitmap, @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer11.rs b/crates/store/re_types/src/testing/components/affix_fuzzer11.rs index 084a550a5053..53a59b8fb733 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer11.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer11.rs @@ -67,7 +67,7 @@ impl std::ops::DerefMut for AffixFuzzer11 { impl ::re_types_core::Loggable for AffixFuzzer11 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( @@ -77,7 +77,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -117,7 +117,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { .into(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, PrimitiveArray::new(DataType::Float32, data0_inner_data, data0_inner_bitmap) .boxed(), @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -142,7 +142,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 261a65e6a551..fc728f88e2a3 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs @@ -67,7 +67,7 @@ impl std::ops::DerefMut for AffixFuzzer12 { impl ::re_types_core::Loggable for AffixFuzzer12 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( @@ -77,7 +77,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -111,7 +111,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -139,7 +139,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -153,7 +153,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 945dea2c3b5a..05e6dc12830d 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs @@ -67,7 +67,7 @@ impl std::ops::DerefMut for AffixFuzzer13 { impl ::re_types_core::Loggable for AffixFuzzer13 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( @@ -77,7 +77,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -111,7 +111,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -139,7 +139,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -153,7 +153,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer14.rs b/crates/store/re_types/src/testing/components/affix_fuzzer14.rs index be03f5900bf2..4687a179c300 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer14.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer14.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer14 { impl ::re_types_core::Loggable for AffixFuzzer14 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer3::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer3::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer14 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer15.rs b/crates/store/re_types/src/testing/components/affix_fuzzer15.rs index f0cb039bfcb9..f4e7b612d576 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer15.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer15.rs @@ -66,7 +66,7 @@ impl std::ops::DerefMut for AffixFuzzer15 { impl ::re_types_core::Loggable for AffixFuzzer15 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Union( @@ -77,7 +77,7 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { "craziness", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -97,7 +97,7 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -122,12 +122,12 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { }; { _ = data0_bitmap; - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt(data0)? + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -137,7 +137,7 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer15#single_optional_union")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer16.rs b/crates/store/re_types/src/testing/components/affix_fuzzer16.rs index 90becc8d5799..219d7765f3ce 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer16.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer16.rs @@ -45,17 +45,17 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer16 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,11 +89,11 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { _ = data0_inner_bitmap; - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt( data0_inner_data.into_iter().map(Some), )? }, @@ -104,7 +104,7 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data_inner) + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data_inner) .with_context( "rerun.testing.components.AffixFuzzer16#many_required_unions", )? diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer17.rs b/crates/store/re_types/src/testing/components/affix_fuzzer17.rs index c380dbdbe64a..534a28d3be0b 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer17.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer17.rs @@ -45,17 +45,17 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer17 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,11 +89,11 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { _ = data0_inner_bitmap; - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt( data0_inner_data.into_iter().map(Some), )? }, @@ -104,7 +104,7 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data_inner) + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data_inner) .with_context( "rerun.testing.components.AffixFuzzer17#many_optional_unions", )? diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer18.rs b/crates/store/re_types/src/testing/components/affix_fuzzer18.rs index 714bc2441f88..bc25d2cb4863 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer18.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer18.rs @@ -45,17 +45,17 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer18 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,11 +89,11 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { _ = data0_inner_bitmap; - crate::testing::datatypes::AffixFuzzer4::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer4::to_arrow2_opt( data0_inner_data.into_iter().map(Some), )? }, @@ -104,7 +104,7 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer4::from_arrow_opt(arrow_data_inner) + crate::testing::datatypes::AffixFuzzer4::from_arrow2_opt(arrow_data_inner) .with_context( "rerun.testing.components.AffixFuzzer18#many_optional_unions", )? diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer19.rs b/crates/store/re_types/src/testing/components/affix_fuzzer19.rs index d2c032b907ef..3faf8cb8f426 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer19.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer19.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer19 { impl ::re_types_core::Loggable for AffixFuzzer19 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer5::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer5::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer5::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer5::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer19 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer5::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer5::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer2.rs b/crates/store/re_types/src/testing/components/affix_fuzzer2.rs index 82fb7a5be685..6e08ac4ae15b 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer2.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer2 { impl ::re_types_core::Loggable for AffixFuzzer2 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer20.rs b/crates/store/re_types/src/testing/components/affix_fuzzer20.rs index 9008a0b2821c..5b11f9882311 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer20.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer20 { impl ::re_types_core::Loggable for AffixFuzzer20 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer20::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer20::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer20::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer20::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer20::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer20::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer21.rs b/crates/store/re_types/src/testing/components/affix_fuzzer21.rs index 3ee032822b9b..59a83ee8b033 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer21.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer21 { impl ::re_types_core::Loggable for AffixFuzzer21 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer21::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer21::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer21::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer21::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer21::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer21::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer22.rs b/crates/store/re_types/src/testing/components/affix_fuzzer22.rs index 4e7e70e7434d..702a930cd779 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer22.rs @@ -66,7 +66,7 @@ impl std::ops::DerefMut for AffixFuzzer22 { impl ::re_types_core::Loggable for AffixFuzzer22 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![Field::new( @@ -79,7 +79,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { )])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -104,12 +104,12 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { }; { _ = data0_bitmap; - crate::testing::datatypes::AffixFuzzer22::to_arrow_opt(data0)? + crate::testing::datatypes::AffixFuzzer22::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -119,7 +119,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::AffixFuzzer22::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer22::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer22#nullable_nested_array")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer23.rs b/crates/store/re_types/src/testing/components/affix_fuzzer23.rs index 08a9e59fe5c1..9ba6cfddf4b1 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer23.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer23.rs @@ -66,24 +66,24 @@ impl std::ops::DerefMut for AffixFuzzer23 { impl ::re_types_core::Loggable for AffixFuzzer23 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "value1", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "value2", - ::arrow_datatype(), + ::arrow2_datatype(), true, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -108,12 +108,12 @@ impl ::re_types_core::Loggable for AffixFuzzer23 { }; { _ = data0_bitmap; - crate::testing::datatypes::MultiEnum::to_arrow_opt(data0)? + crate::testing::datatypes::MultiEnum::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -123,7 +123,7 @@ impl ::re_types_core::Loggable for AffixFuzzer23 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::MultiEnum::from_arrow_opt(arrow_data) + crate::testing::datatypes::MultiEnum::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer23#multi_enum")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer3.rs b/crates/store/re_types/src/testing/components/affix_fuzzer3.rs index 9e66eb630274..af35a0419554 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer3.rs @@ -66,17 +66,17 @@ impl std::ops::DerefMut for AffixFuzzer3 { impl ::re_types_core::Loggable for AffixFuzzer3 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data.into_iter().map(|datum| { + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -84,13 +84,13 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer4.rs b/crates/store/re_types/src/testing/components/affix_fuzzer4.rs index b133db98b95a..4ca219066dcc 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer4.rs @@ -66,7 +66,7 @@ impl std::ops::DerefMut for AffixFuzzer4 { impl ::re_types_core::Loggable for AffixFuzzer4 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -103,14 +103,14 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -135,12 +135,12 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }; { _ = data0_bitmap; - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data0)? + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -150,7 +150,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer4#single_optional")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer5.rs b/crates/store/re_types/src/testing/components/affix_fuzzer5.rs index 9d741271a565..c512bb1a6e18 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer5.rs @@ -66,7 +66,7 @@ impl std::ops::DerefMut for AffixFuzzer5 { impl ::re_types_core::Loggable for AffixFuzzer5 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -103,14 +103,14 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -135,12 +135,12 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { }; { _ = data0_bitmap; - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data0)? + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -150,7 +150,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer5#single_optional")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer6.rs b/crates/store/re_types/src/testing/components/affix_fuzzer6.rs index bbd60a73034c..2262d272706f 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer6.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer6.rs @@ -66,7 +66,7 @@ impl std::ops::DerefMut for AffixFuzzer6 { impl ::re_types_core::Loggable for AffixFuzzer6 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -103,14 +103,14 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -135,12 +135,12 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { }; { _ = data0_bitmap; - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt(data0)? + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt(data0)? } }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -150,7 +150,7 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { use ::re_types_core::{Loggable as _, ResultExt as _}; use arrow2::{array::*, buffer::*, datatypes::*}; Ok( - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer6#single_optional")? .into_iter() .map(Ok) diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer7.rs b/crates/store/re_types/src/testing/components/affix_fuzzer7.rs index a123532f5ca0..aa10689cd4a2 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer7.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer7.rs @@ -45,17 +45,17 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer7 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,11 +89,11 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { _ = data0_inner_bitmap; - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt( data0_inner_data.into_iter().map(Some), )? }, @@ -104,7 +104,7 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data_inner) + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data_inner) .with_context("rerun.testing.components.AffixFuzzer7#many_optional")? .into_iter() .collect::>() diff --git a/crates/store/re_types/src/testing/components/affix_fuzzer8.rs b/crates/store/re_types/src/testing/components/affix_fuzzer8.rs index f0f5efc763e7..6ad9b5b2ccd9 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer8.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer8.rs @@ -67,13 +67,13 @@ impl std::ops::DerefMut for AffixFuzzer8 { impl ::re_types_core::Loggable for AffixFuzzer8 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Float32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -97,7 +97,7 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -105,7 +105,7 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 f22b296b73ce..10b644a52364 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs @@ -67,13 +67,13 @@ impl std::ops::DerefMut for AffixFuzzer9 { impl ::re_types_core::Loggable for AffixFuzzer9 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Utf8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -109,7 +109,7 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, inner_data, data0_bitmap, @@ -120,7 +120,7 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -134,7 +134,7 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 cb43031ebae8..d22efc615d8f 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs @@ -63,7 +63,7 @@ impl ::re_types_core::SizeBytes for AffixFuzzer1 { impl ::re_types_core::Loggable for AffixFuzzer1 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -100,14 +100,14 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -130,7 +130,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, single_float_optional): (Vec<_>, Vec<_>) = data @@ -452,7 +452,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { }; { _ = almost_flattened_scalar_bitmap; - crate::testing::datatypes::FlattenedScalar::to_arrow_opt( + crate::testing::datatypes::FlattenedScalar::to_arrow2_opt( almost_flattened_scalar, )? } @@ -489,7 +489,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -503,7 +503,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -521,7 +521,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let single_float_optional = { if !arrays_by_name.contains_key("single_float_optional") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "single_float_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -542,7 +542,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let single_string_required = { if !arrays_by_name.contains_key("single_string_required") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "single_string_required", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -599,7 +599,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let single_string_optional = { if !arrays_by_name.contains_key("single_string_optional") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "single_string_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -656,7 +656,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let many_floats_optional = { if !arrays_by_name.contains_key("many_floats_optional") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "many_floats_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -731,7 +731,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let many_strings_required = { if !arrays_by_name.contains_key("many_strings_required") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "many_strings_required", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -852,7 +852,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let many_strings_optional = { if !arrays_by_name.contains_key("many_strings_optional") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "many_strings_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -973,7 +973,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let flattened_scalar = { if !arrays_by_name.contains_key("flattened_scalar") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "flattened_scalar", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -994,13 +994,13 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let almost_flattened_scalar = { if !arrays_by_name.contains_key("almost_flattened_scalar") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "almost_flattened_scalar", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); } let arrow_data = &**arrays_by_name["almost_flattened_scalar"]; - crate::testing::datatypes::FlattenedScalar::from_arrow_opt(arrow_data) + crate::testing::datatypes::FlattenedScalar::from_arrow2_opt(arrow_data) .with_context( "rerun.testing.datatypes.AffixFuzzer1#almost_flattened_scalar", )? @@ -1009,7 +1009,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { let from_parent = { if !arrays_by_name.contains_key("from_parent") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "from_parent", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs index 179fa1ea0a6e..7c95e803d809 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs @@ -51,13 +51,13 @@ impl From for Option { impl ::re_types_core::Loggable for AffixFuzzer2 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Float32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -81,7 +81,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -89,7 +89,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -102,7 +102,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 ceb389037160..95e91b3ac20e 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs @@ -41,24 +41,24 @@ impl ::re_types_core::SizeBytes for AffixFuzzer20 { impl ::re_types_core::Loggable for AffixFuzzer20 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "p", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "s", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -81,7 +81,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, p): (Vec<_>, Vec<_>) = data @@ -148,7 +148,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -162,7 +162,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -180,7 +180,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { let p = { if !arrays_by_name.contains_key("p") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "p", )) .with_context("rerun.testing.datatypes.AffixFuzzer20"); @@ -204,7 +204,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { let s = { if !arrays_by_name.contains_key("s") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "s", )) .with_context("rerun.testing.datatypes.AffixFuzzer20"); diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs index 6c16fe95ebeb..acec414caa74 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs @@ -41,7 +41,7 @@ impl ::re_types_core::SizeBytes for AffixFuzzer21 { impl ::re_types_core::Loggable for AffixFuzzer21 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ @@ -58,7 +58,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -81,7 +81,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, single_half): (Vec<_>, Vec<_>) = data @@ -158,7 +158,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -172,7 +172,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -190,7 +190,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { let single_half = { if !arrays_by_name.contains_key("single_half") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "single_half", )) .with_context("rerun.testing.datatypes.AffixFuzzer21"); @@ -211,7 +211,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { let many_halves = { if !arrays_by_name.contains_key("many_halves") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "many_halves", )) .with_context("rerun.testing.datatypes.AffixFuzzer21"); diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs index a826fe086900..a0d493405db4 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs @@ -53,7 +53,7 @@ impl From for [u8; 4usize] { impl ::re_types_core::Loggable for AffixFuzzer22 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![Field::new( @@ -66,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { )])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -89,7 +89,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![{ let (somes, fixed_sized_native): (Vec<_>, Vec<_>) = data .iter() @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -159,7 +159,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -177,7 +177,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { let fixed_sized_native = { if !arrays_by_name.contains_key("fixed_sized_native") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "fixed_sized_native", )) .with_context("rerun.testing.datatypes.AffixFuzzer22"); diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs index 9bf5051d454e..61c3daf2a70c 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs @@ -50,7 +50,7 @@ impl ::re_types_core::SizeBytes for AffixFuzzer3 { impl ::re_types_core::Loggable for AffixFuzzer3 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Union( @@ -61,7 +61,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { "craziness", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -81,7 +81,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -149,13 +149,13 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), offsets, { _ = craziness_inner_bitmap; - crate::testing::datatypes::AffixFuzzer1::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::to_arrow2_opt( craziness_inner_data.into_iter().map(Some), )? }, @@ -239,11 +239,11 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { }) .collect() }); - UnionArray::new(Self::arrow_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -257,7 +257,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -270,7 +270,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -312,7 +312,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -324,7 +324,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer1::from_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt( arrow_data_inner, ) .with_context("rerun.testing.datatypes.AffixFuzzer3#craziness")? @@ -531,7 +531,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { _ => { return Err( DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", *typ as _, ), diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs index 3488a15d4987..d9dd23bdda6a 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs @@ -45,7 +45,7 @@ impl ::re_types_core::SizeBytes for AffixFuzzer4 { impl ::re_types_core::Loggable for AffixFuzzer4 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Union( @@ -53,14 +53,14 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { Field::new("_null_markers", DataType::Null, true), Field::new( "single_required", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "many_required", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), false, @@ -71,7 +71,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -111,7 +111,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { let single_required_bitmap: Option = None; { _ = single_required_bitmap; - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt( single_required.into_iter().map(Some), )? } @@ -137,13 +137,13 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))), offsets, { _ = many_required_inner_bitmap; - crate::testing::datatypes::AffixFuzzer3::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::to_arrow2_opt( many_required_inner_data.into_iter().map(Some), )? }, @@ -177,11 +177,11 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }) .collect() }); - UnionArray::new(Self::arrow_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -195,7 +195,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -208,7 +208,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -225,7 +225,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { return Ok(Vec::new()); } let arrow_data = &*arrow_data_arrays[1usize]; - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data) .with_context("rerun.testing.datatypes.AffixFuzzer4#single_required")? .into_iter() .collect::>() @@ -242,7 +242,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow_datatype(), + ::arrow2_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -254,7 +254,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { } else { let arrow_data_inner = { let arrow_data_inner = &**arrow_data.values(); - crate::testing::datatypes::AffixFuzzer3::from_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt( arrow_data_inner, ) .with_context("rerun.testing.datatypes.AffixFuzzer4#many_required")? @@ -344,7 +344,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }), _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", *typ as _, )); diff --git a/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs b/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs index 853bdd8f1237..73539660664a 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for AffixFuzzer5 { impl ::re_types_core::Loggable for AffixFuzzer5 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![Field::new( "single_optional_union", - ::arrow_datatype(), + ::arrow2_datatype(), true, )])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -103,7 +103,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![{ let (somes, single_optional_union): (Vec<_>, Vec<_>) = data .iter() @@ -121,7 +121,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { }; { _ = single_optional_union_bitmap; - crate::testing::datatypes::AffixFuzzer4::to_arrow_opt( + crate::testing::datatypes::AffixFuzzer4::to_arrow2_opt( single_optional_union, )? } @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -164,13 +164,13 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { let single_optional_union = { if !arrays_by_name.contains_key("single_optional_union") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "single_optional_union", )) .with_context("rerun.testing.datatypes.AffixFuzzer5"); } let arrow_data = &**arrays_by_name["single_optional_union"]; - crate::testing::datatypes::AffixFuzzer4::from_arrow_opt(arrow_data) + crate::testing::datatypes::AffixFuzzer4::from_arrow2_opt(arrow_data) .with_context("rerun.testing.datatypes.AffixFuzzer5#single_optional_union")? .into_iter() }; diff --git a/crates/store/re_types/src/testing/datatypes/enum_test.rs b/crates/store/re_types/src/testing/datatypes/enum_test.rs index 498aa76e6a12..a9dc54bd359c 100644 --- a/crates/store/re_types/src/testing/datatypes/enum_test.rs +++ b/crates/store/re_types/src/testing/datatypes/enum_test.rs @@ -98,13 +98,13 @@ impl std::fmt::Display for EnumTest { impl ::re_types_core::Loggable for EnumTest { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for EnumTest { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -136,7 +136,7 @@ impl ::re_types_core::Loggable for EnumTest { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -149,7 +149,7 @@ impl ::re_types_core::Loggable for EnumTest { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -165,7 +165,7 @@ impl ::re_types_core::Loggable for EnumTest { Some(6) => Ok(Some(Self::Back)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs b/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs index 6cfbd9bd4455..c2026cf16e19 100644 --- a/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs +++ b/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs @@ -53,7 +53,7 @@ impl From for f32 { impl ::re_types_core::Loggable for FlattenedScalar { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![Field::new( @@ -63,7 +63,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { )])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -86,7 +86,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![{ let (somes, value): (Vec<_>, Vec<_>) = data .iter() @@ -112,7 +112,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -126,7 +126,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -144,7 +144,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { let value = { if !arrays_by_name.contains_key("value") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "value", )) .with_context("rerun.testing.datatypes.FlattenedScalar"); diff --git a/crates/store/re_types/src/testing/datatypes/multi_enum.rs b/crates/store/re_types/src/testing/datatypes/multi_enum.rs index a6a82f0ec089..dcd3d57bac70 100644 --- a/crates/store/re_types/src/testing/datatypes/multi_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/multi_enum.rs @@ -44,24 +44,24 @@ impl ::re_types_core::SizeBytes for MultiEnum { impl ::re_types_core::Loggable for MultiEnum { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "value1", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "value2", - ::arrow_datatype(), + ::arrow2_datatype(), true, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -84,7 +84,7 @@ impl ::re_types_core::Loggable for MultiEnum { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, value1): (Vec<_>, Vec<_>) = data @@ -100,7 +100,7 @@ impl ::re_types_core::Loggable for MultiEnum { }; { _ = value1_bitmap; - crate::testing::datatypes::EnumTest::to_arrow_opt(value1)? + crate::testing::datatypes::EnumTest::to_arrow2_opt(value1)? } }, { @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for MultiEnum { }; { _ = value2_bitmap; - crate::testing::datatypes::ValuedEnum::to_arrow_opt(value2)? + crate::testing::datatypes::ValuedEnum::to_arrow2_opt(value2)? } }, ], @@ -128,7 +128,7 @@ impl ::re_types_core::Loggable for MultiEnum { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -142,7 +142,7 @@ impl ::re_types_core::Loggable for MultiEnum { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,26 +160,26 @@ impl ::re_types_core::Loggable for MultiEnum { let value1 = { if !arrays_by_name.contains_key("value1") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "value1", )) .with_context("rerun.testing.datatypes.MultiEnum"); } let arrow_data = &**arrays_by_name["value1"]; - crate::testing::datatypes::EnumTest::from_arrow_opt(arrow_data) + crate::testing::datatypes::EnumTest::from_arrow2_opt(arrow_data) .with_context("rerun.testing.datatypes.MultiEnum#value1")? .into_iter() }; let value2 = { if !arrays_by_name.contains_key("value2") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "value2", )) .with_context("rerun.testing.datatypes.MultiEnum"); } let arrow_data = &**arrays_by_name["value2"]; - crate::testing::datatypes::ValuedEnum::from_arrow_opt(arrow_data) + crate::testing::datatypes::ValuedEnum::from_arrow2_opt(arrow_data) .with_context("rerun.testing.datatypes.MultiEnum#value2")? .into_iter() }; diff --git a/crates/store/re_types/src/testing/datatypes/primitive_component.rs b/crates/store/re_types/src/testing/datatypes/primitive_component.rs index f9c70c54b957..19909bf4eb34 100644 --- a/crates/store/re_types/src/testing/datatypes/primitive_component.rs +++ b/crates/store/re_types/src/testing/datatypes/primitive_component.rs @@ -52,13 +52,13 @@ impl From for u32 { impl ::re_types_core::Loggable for PrimitiveComponent { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -82,7 +82,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -90,7 +90,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -103,7 +103,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { 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 8d3ceedddf6c..b3b776a761c4 100644 --- a/crates/store/re_types/src/testing/datatypes/string_component.rs +++ b/crates/store/re_types/src/testing/datatypes/string_component.rs @@ -52,13 +52,13 @@ impl From for ::re_types_core::ArrowString { impl ::re_types_core::Loggable for StringComponent { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Utf8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -94,7 +94,7 @@ impl ::re_types_core::Loggable for StringComponent { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, inner_data, data0_bitmap, @@ -105,7 +105,7 @@ impl ::re_types_core::Loggable for StringComponent { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -119,7 +119,7 @@ impl ::re_types_core::Loggable for StringComponent { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/testing/datatypes/valued_enum.rs b/crates/store/re_types/src/testing/datatypes/valued_enum.rs index 9c5716906b7d..fd4120ce6125 100644 --- a/crates/store/re_types/src/testing/datatypes/valued_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/valued_enum.rs @@ -80,13 +80,13 @@ impl std::fmt::Display for ValuedEnum { impl ::re_types_core::Loggable for ValuedEnum { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -110,7 +110,7 @@ impl ::re_types_core::Loggable for ValuedEnum { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -118,7 +118,7 @@ impl ::re_types_core::Loggable for ValuedEnum { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -131,7 +131,7 @@ impl ::re_types_core::Loggable for ValuedEnum { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -145,7 +145,7 @@ impl ::re_types_core::Loggable for ValuedEnum { Some(42) => Ok(Some(Self::TheAnswer)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/tests/types/validity.rs b/crates/store/re_types/tests/types/validity.rs index 776d4c29ee72..dab289a75f92 100644 --- a/crates/store/re_types/tests/types/validity.rs +++ b/crates/store/re_types/tests/types/validity.rs @@ -10,8 +10,8 @@ fn validity_checks() { components::Position2D::new(3.0, 4.0), // ]; - let serialized = Position2D::to_arrow(good_non_nullable).unwrap(); - let deserialized = Position2D::from_arrow(serialized.as_ref()); + let serialized = Position2D::to_arrow2(good_non_nullable).unwrap(); + let deserialized = Position2D::from_arrow2(serialized.as_ref()); assert!(deserialized.is_ok()); let good_nullable = vec![ @@ -19,8 +19,8 @@ fn validity_checks() { Some(components::Position2D::new(3.0, 4.0)), // ]; - let serialized = Position2D::to_arrow_opt(good_nullable).unwrap(); - let deserialized = Position2D::from_arrow(serialized.as_ref()); + let serialized = Position2D::to_arrow2_opt(good_nullable).unwrap(); + let deserialized = Position2D::from_arrow2(serialized.as_ref()); assert!(deserialized.is_ok()); let bad = vec![ @@ -28,8 +28,8 @@ fn validity_checks() { None, ]; - let serialized = Position2D::to_arrow_opt(bad).unwrap(); - let deserialized = Position2D::from_arrow(serialized.as_ref()); + let serialized = Position2D::to_arrow2_opt(bad).unwrap(); + let deserialized = Position2D::from_arrow2(serialized.as_ref()); assert!(deserialized.is_err()); assert!(matches!( deserialized.err().unwrap(), diff --git a/crates/store/re_types_blueprint/src/blueprint/archetypes/container_blueprint.rs b/crates/store/re_types_blueprint/src/blueprint/archetypes/container_blueprint.rs index aaf6777f480b..e7aec84d119a 100644 --- a/crates/store/re_types_blueprint/src/blueprint/archetypes/container_blueprint.rs +++ b/crates/store/re_types_blueprint/src/blueprint/archetypes/container_blueprint.rs @@ -173,7 +173,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -187,7 +187,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { .get("rerun.blueprint.components.ContainerKind") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#container_kind")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#container_kind")? .into_iter() .next() @@ -196,7 +196,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { .with_context("rerun.blueprint.archetypes.ContainerBlueprint#container_kind")? }; let display_name = if let Some(array) = arrays_by_name.get("rerun.components.Name") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#display_name")? .into_iter() .next() @@ -207,7 +207,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { let contents = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.IncludedContent") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#contents")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -220,7 +220,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { let col_shares = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.ColumnShare") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#col_shares")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -233,7 +233,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { let row_shares = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.RowShare") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#row_shares")? .into_iter() .map(|v| v.ok_or_else(DeserializationError::missing_data)) @@ -245,7 +245,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { }; let active_tab = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.ActiveTab") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#active_tab")? .into_iter() .next() @@ -255,7 +255,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { }; let visible = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.Visible") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#visible")? .into_iter() .next() @@ -265,7 +265,7 @@ impl ::re_types_core::Archetype for ContainerBlueprint { }; let grid_columns = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.GridColumns") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ContainerBlueprint#grid_columns")? .into_iter() .next() diff --git a/crates/store/re_types_blueprint/src/blueprint/archetypes/panel_blueprint.rs b/crates/store/re_types_blueprint/src/blueprint/archetypes/panel_blueprint.rs index 3984afa94aa1..10cefb067298 100644 --- a/crates/store/re_types_blueprint/src/blueprint/archetypes/panel_blueprint.rs +++ b/crates/store/re_types_blueprint/src/blueprint/archetypes/panel_blueprint.rs @@ -101,7 +101,7 @@ impl ::re_types_core::Archetype for PanelBlueprint { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -112,7 +112,7 @@ impl ::re_types_core::Archetype for PanelBlueprint { .collect(); let state = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.PanelState") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.PanelBlueprint#state")? .into_iter() .next() diff --git a/crates/store/re_types_blueprint/src/blueprint/archetypes/viewport_blueprint.rs b/crates/store/re_types_blueprint/src/blueprint/archetypes/viewport_blueprint.rs index 2e16b2183925..04a55c4771da 100644 --- a/crates/store/re_types_blueprint/src/blueprint/archetypes/viewport_blueprint.rs +++ b/crates/store/re_types_blueprint/src/blueprint/archetypes/viewport_blueprint.rs @@ -147,7 +147,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -158,7 +158,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { .collect(); let root_container = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.RootContainer") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ViewportBlueprint#root_container")? .into_iter() .next() @@ -169,7 +169,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { let maximized = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.SpaceViewMaximized") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ViewportBlueprint#maximized")? .into_iter() .next() @@ -179,7 +179,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { }; let auto_layout = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.AutoLayout") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ViewportBlueprint#auto_layout")? .into_iter() .next() @@ -189,7 +189,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { }; let auto_space_views = if let Some(array) = arrays_by_name.get("rerun.blueprint.components.AutoSpaceViews") { - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.blueprint.archetypes.ViewportBlueprint#auto_space_views")? .into_iter() .next() @@ -201,7 +201,7 @@ impl ::re_types_core::Archetype for ViewportBlueprint { arrays_by_name.get("rerun.blueprint.components.ViewerRecommendationHash") { Some({ - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context( "rerun.blueprint.archetypes.ViewportBlueprint#past_viewer_recommendations", )? diff --git a/crates/store/re_types_blueprint/src/blueprint/components/auto_layout.rs b/crates/store/re_types_blueprint/src/blueprint/components/auto_layout.rs index d9db5c88b910..360a2a010205 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/auto_layout.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/auto_layout.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for AutoLayout { impl ::re_types_core::Loggable for AutoLayout { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for AutoLayout { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/auto_space_views.rs b/crates/store/re_types_blueprint/src/blueprint/components/auto_space_views.rs index c15b548c580e..6d6dcbb85433 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/auto_space_views.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/auto_space_views.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for AutoSpaceViews { impl ::re_types_core::Loggable for AutoSpaceViews { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,13 +86,13 @@ impl ::re_types_core::Loggable for AutoSpaceViews { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/container_kind.rs b/crates/store/re_types_blueprint/src/blueprint/components/container_kind.rs index bed17da7ed23..5ebb190b29aa 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/container_kind.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/container_kind.rs @@ -81,13 +81,13 @@ impl std::fmt::Display for ContainerKind { impl ::re_types_core::Loggable for ContainerKind { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -111,7 +111,7 @@ impl ::re_types_core::Loggable for ContainerKind { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -119,7 +119,7 @@ impl ::re_types_core::Loggable for ContainerKind { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -132,7 +132,7 @@ impl ::re_types_core::Loggable for ContainerKind { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +146,7 @@ impl ::re_types_core::Loggable for ContainerKind { Some(4) => Ok(Some(Self::Grid)), None => Ok(None), Some(invalid) => Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types_blueprint/src/blueprint/components/grid_columns.rs b/crates/store/re_types_blueprint/src/blueprint/components/grid_columns.rs index 37d364c8ede9..ba34790b1828 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/grid_columns.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/grid_columns.rs @@ -70,17 +70,17 @@ impl std::ops::DerefMut for GridColumns { impl ::re_types_core::Loggable for GridColumns { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UInt32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::UInt32::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::UInt32::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::UInt32::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,22 +88,22 @@ impl ::re_types_core::Loggable for GridColumns { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::UInt32::from_arrow_opt(arrow_data) + crate::datatypes::UInt32::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::UInt32::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::UInt32::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/included_space_view.rs b/crates/store/re_types_blueprint/src/blueprint/components/included_space_view.rs index c04918db3752..35c9ab3a2602 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/included_space_view.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/included_space_view.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for IncludedSpaceView { impl ::re_types_core::Loggable for IncludedSpaceView { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Uuid::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Uuid::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Uuid::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for IncludedSpaceView { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Uuid::from_arrow_opt(arrow_data) + crate::datatypes::Uuid::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Uuid::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Uuid::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/root_container.rs b/crates/store/re_types_blueprint/src/blueprint/components/root_container.rs index 4c3888fc11fa..689504890fb6 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/root_container.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/root_container.rs @@ -71,17 +71,17 @@ impl std::ops::DerefMut for RootContainer { impl ::re_types_core::Loggable for RootContainer { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Uuid::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Uuid::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Uuid::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -89,22 +89,22 @@ impl ::re_types_core::Loggable for RootContainer { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Uuid::from_arrow_opt(arrow_data) + crate::datatypes::Uuid::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Uuid::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Uuid::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/space_view_maximized.rs b/crates/store/re_types_blueprint/src/blueprint/components/space_view_maximized.rs index 2af3e05428ac..fafdbb6a51cf 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/space_view_maximized.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/space_view_maximized.rs @@ -68,17 +68,17 @@ impl std::ops::DerefMut for SpaceViewMaximized { impl ::re_types_core::Loggable for SpaceViewMaximized { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Uuid::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Uuid::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Uuid::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -86,22 +86,22 @@ impl ::re_types_core::Loggable for SpaceViewMaximized { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Uuid::from_arrow_opt(arrow_data) + crate::datatypes::Uuid::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { - crate::datatypes::Uuid::from_arrow(arrow_data).map(|v| v.into_iter().map(Self).collect()) + crate::datatypes::Uuid::from_arrow2(arrow_data).map(|v| v.into_iter().map(Self).collect()) } } diff --git a/crates/store/re_types_blueprint/src/blueprint/components/visualizer_overrides.rs b/crates/store/re_types_blueprint/src/blueprint/components/visualizer_overrides.rs index ade47bf4371e..ece137edb0db 100644 --- a/crates/store/re_types_blueprint/src/blueprint/components/visualizer_overrides.rs +++ b/crates/store/re_types_blueprint/src/blueprint/components/visualizer_overrides.rs @@ -103,17 +103,17 @@ impl std::ops::DerefMut for VisualizerOverrides { impl ::re_types_core::Loggable for VisualizerOverrides { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::Utf8List::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::blueprint::datatypes::Utf8List::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::blueprint::datatypes::Utf8List::to_arrow_opt(data.into_iter().map(|datum| { + crate::blueprint::datatypes::Utf8List::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -121,13 +121,13 @@ impl ::re_types_core::Loggable for VisualizerOverrides { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::blueprint::datatypes::Utf8List::from_arrow_opt(arrow_data) + crate::blueprint::datatypes::Utf8List::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } 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 c06c964f4539..2dfbf0df0ecf 100644 --- a/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs +++ b/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs @@ -53,7 +53,7 @@ impl From for Vec<::re_types_core::ArrowString> { impl ::re_types_core::Loggable for Utf8List { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( @@ -63,7 +63,7 @@ impl ::re_types_core::Loggable for Utf8List { ))) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -97,7 +97,7 @@ impl ::re_types_core::Loggable for Utf8List { let data0_inner_data: Vec<_> = data0.into_iter().flatten().flatten().collect(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -125,7 +125,7 @@ impl ::re_types_core::Loggable for Utf8List { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -139,7 +139,7 @@ impl ::re_types_core::Loggable for Utf8List { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types_core/benches/bench_tuid.rs b/crates/store/re_types_core/benches/bench_tuid.rs index 13985268abe5..b82ab4716751 100644 --- a/crates/store/re_types_core/benches/bench_tuid.rs +++ b/crates/store/re_types_core/benches/bench_tuid.rs @@ -16,7 +16,7 @@ fn bench_arrow(c: &mut Criterion) { group.bench_function("arrow2", |b| { b.iter(|| { - let data: Box = re_tuid::Tuid::to_arrow(tuids.clone()).unwrap(); + let data: Box = re_tuid::Tuid::to_arrow2(tuids.clone()).unwrap(); criterion::black_box(data) }); }); @@ -27,11 +27,11 @@ fn bench_arrow(c: &mut Criterion) { group.throughput(criterion::Throughput::Elements(elem_count)); let data: Box = - re_tuid::Tuid::to_arrow(vec![re_tuid::Tuid::new(); elem_count as usize]).unwrap(); + re_tuid::Tuid::to_arrow2(vec![re_tuid::Tuid::new(); elem_count as usize]).unwrap(); group.bench_function("arrow2", |b| { b.iter(|| { - let tuids = re_tuid::Tuid::from_arrow(data.as_ref()).unwrap(); + let tuids = re_tuid::Tuid::from_arrow2(data.as_ref()).unwrap(); criterion::black_box(tuids) }); }); diff --git a/crates/store/re_types_core/src/archetype.rs b/crates/store/re_types_core/src/archetype.rs index 3a54852c030c..750df83ab64c 100644 --- a/crates/store/re_types_core/src/archetype.rs +++ b/crates/store/re_types_core/src/archetype.rs @@ -102,13 +102,13 @@ pub trait Archetype { /// Arrow arrays that are unknown to this [`Archetype`] will simply be ignored and a warning /// logged to stderr. #[inline] - fn from_arrow( + fn from_arrow2( data: impl IntoIterator)>, ) -> DeserializationResult where Self: Sized, { - Self::from_arrow_components( + Self::from_arrow2_components( data.into_iter() .map(|(field, array)| (field.name.into(), array)), ) @@ -120,7 +120,7 @@ pub trait Archetype { /// Arrow arrays that are unknown to this [`Archetype`] will simply be ignored and a warning /// logged to stderr. #[inline] - fn from_arrow_components( + fn from_arrow2_components( data: impl IntoIterator)>, ) -> DeserializationResult where diff --git a/crates/store/re_types_core/src/archetypes/clear.rs b/crates/store/re_types_core/src/archetypes/clear.rs index 67dc724218f8..0fcbbb03603c 100644 --- a/crates/store/re_types_core/src/archetypes/clear.rs +++ b/crates/store/re_types_core/src/archetypes/clear.rs @@ -155,7 +155,7 @@ impl crate::Archetype for Clear { } #[inline] - fn from_arrow_components( + fn from_arrow2_components( arrow_data: impl IntoIterator)>, ) -> DeserializationResult { re_tracing::profile_function!(); @@ -169,7 +169,7 @@ impl crate::Archetype for Clear { .get("rerun.components.ClearIsRecursive") .ok_or_else(DeserializationError::missing_data) .with_context("rerun.archetypes.Clear#is_recursive")?; - ::from_arrow_opt(&**array) + ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Clear#is_recursive")? .into_iter() .next() diff --git a/crates/store/re_types_core/src/components/clear_is_recursive.rs b/crates/store/re_types_core/src/components/clear_is_recursive.rs index 351c56738587..a9c92574dcd8 100644 --- a/crates/store/re_types_core/src/components/clear_is_recursive.rs +++ b/crates/store/re_types_core/src/components/clear_is_recursive.rs @@ -70,17 +70,17 @@ crate::macros::impl_into_cow!(ClearIsRecursive); impl crate::Loggable for ClearIsRecursive { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + crate::datatypes::Bool::arrow2_datatype() } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where Self: Clone + 'a, { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + crate::datatypes::Bool::to_arrow2_opt(data.into_iter().map(|datum| { datum.map(|datum| match datum.into() { ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), @@ -88,13 +88,13 @@ impl crate::Loggable for ClearIsRecursive { })) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where Self: Sized, { - crate::datatypes::Bool::from_arrow_opt(arrow_data) + crate::datatypes::Bool::from_arrow2_opt(arrow_data) .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) } } diff --git a/crates/store/re_types_core/src/datatypes/bool.rs b/crates/store/re_types_core/src/datatypes/bool.rs index d833f7fc4c83..b66bdfd0a3c6 100644 --- a/crates/store/re_types_core/src/datatypes/bool.rs +++ b/crates/store/re_types_core/src/datatypes/bool.rs @@ -53,13 +53,13 @@ crate::macros::impl_into_cow!(Bool); impl crate::Loggable for Bool { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Boolean } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -83,7 +83,7 @@ impl crate::Loggable for Bool { any_nones.then(|| somes.into()) }; BooleanArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -91,7 +91,7 @@ impl crate::Loggable for Bool { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -104,7 +104,7 @@ impl crate::Loggable for Bool { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 ee68542b15f6..99bb1f1aa615 100644 --- a/crates/store/re_types_core/src/datatypes/entity_path.rs +++ b/crates/store/re_types_core/src/datatypes/entity_path.rs @@ -53,13 +53,13 @@ crate::macros::impl_into_cow!(EntityPath); impl crate::Loggable for EntityPath { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Utf8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -95,7 +95,7 @@ impl crate::Loggable for EntityPath { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, inner_data, data0_bitmap, @@ -106,7 +106,7 @@ impl crate::Loggable for EntityPath { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -120,7 +120,7 @@ impl crate::Loggable for EntityPath { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types_core/src/datatypes/float32.rs b/crates/store/re_types_core/src/datatypes/float32.rs index 0917fa5c4f3e..c026a78e7b86 100644 --- a/crates/store/re_types_core/src/datatypes/float32.rs +++ b/crates/store/re_types_core/src/datatypes/float32.rs @@ -53,13 +53,13 @@ crate::macros::impl_into_cow!(Float32); impl crate::Loggable for Float32 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Float32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -83,7 +83,7 @@ impl crate::Loggable for Float32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -91,7 +91,7 @@ impl crate::Loggable for Float32 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -104,7 +104,7 @@ impl crate::Loggable for Float32 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -119,7 +119,7 @@ impl crate::Loggable for Float32 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/float64.rs b/crates/store/re_types_core/src/datatypes/float64.rs index 4ac1e0a0ac36..e1971f0c6f44 100644 --- a/crates/store/re_types_core/src/datatypes/float64.rs +++ b/crates/store/re_types_core/src/datatypes/float64.rs @@ -53,13 +53,13 @@ crate::macros::impl_into_cow!(Float64); impl crate::Loggable for Float64 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Float64 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -83,7 +83,7 @@ impl crate::Loggable for Float64 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -91,7 +91,7 @@ impl crate::Loggable for Float64 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -104,7 +104,7 @@ impl crate::Loggable for Float64 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -119,7 +119,7 @@ impl crate::Loggable for Float64 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/time_int.rs b/crates/store/re_types_core/src/datatypes/time_int.rs index 64e0138f5b56..8f85561d5cec 100644 --- a/crates/store/re_types_core/src/datatypes/time_int.rs +++ b/crates/store/re_types_core/src/datatypes/time_int.rs @@ -52,13 +52,13 @@ crate::macros::impl_into_cow!(TimeInt); impl crate::Loggable for TimeInt { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Int64 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -82,7 +82,7 @@ impl crate::Loggable for TimeInt { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -90,7 +90,7 @@ impl crate::Loggable for TimeInt { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -103,7 +103,7 @@ impl crate::Loggable for TimeInt { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -118,7 +118,7 @@ impl crate::Loggable for TimeInt { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/time_range.rs b/crates/store/re_types_core/src/datatypes/time_range.rs index 17618f772479..f039d35ef13d 100644 --- a/crates/store/re_types_core/src/datatypes/time_range.rs +++ b/crates/store/re_types_core/src/datatypes/time_range.rs @@ -45,24 +45,24 @@ crate::macros::impl_into_cow!(TimeRange); impl crate::Loggable for TimeRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "start", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "end", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -85,7 +85,7 @@ impl crate::Loggable for TimeRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, start): (Vec<_>, Vec<_>) = data @@ -101,7 +101,7 @@ impl crate::Loggable for TimeRange { }; { _ = start_bitmap; - crate::datatypes::TimeRangeBoundary::to_arrow_opt(start)? + crate::datatypes::TimeRangeBoundary::to_arrow2_opt(start)? } }, { @@ -118,7 +118,7 @@ impl crate::Loggable for TimeRange { }; { _ = end_bitmap; - crate::datatypes::TimeRangeBoundary::to_arrow_opt(end)? + crate::datatypes::TimeRangeBoundary::to_arrow2_opt(end)? } }, ], @@ -128,7 +128,7 @@ impl crate::Loggable for TimeRange { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -142,7 +142,7 @@ impl crate::Loggable for TimeRange { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,26 +160,26 @@ impl crate::Loggable for TimeRange { let start = { if !arrays_by_name.contains_key("start") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "start", )) .with_context("rerun.datatypes.TimeRange"); } let arrow_data = &**arrays_by_name["start"]; - crate::datatypes::TimeRangeBoundary::from_arrow_opt(arrow_data) + crate::datatypes::TimeRangeBoundary::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.TimeRange#start")? .into_iter() }; let end = { if !arrays_by_name.contains_key("end") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "end", )) .with_context("rerun.datatypes.TimeRange"); } let arrow_data = &**arrays_by_name["end"]; - crate::datatypes::TimeRangeBoundary::from_arrow_opt(arrow_data) + crate::datatypes::TimeRangeBoundary::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.TimeRange#end")? .into_iter() }; diff --git a/crates/store/re_types_core/src/datatypes/time_range_boundary.rs b/crates/store/re_types_core/src/datatypes/time_range_boundary.rs index c8d110cfc4d6..80c7defd2f79 100644 --- a/crates/store/re_types_core/src/datatypes/time_range_boundary.rs +++ b/crates/store/re_types_core/src/datatypes/time_range_boundary.rs @@ -52,7 +52,7 @@ crate::macros::impl_into_cow!(TimeRangeBoundary); impl crate::Loggable for TimeRangeBoundary { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Union( @@ -60,12 +60,12 @@ impl crate::Loggable for TimeRangeBoundary { Field::new("_null_markers", DataType::Null, true), Field::new( "CursorRelative", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "Absolute", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new("Infinite", DataType::Null, true), @@ -75,7 +75,7 @@ impl crate::Loggable for TimeRangeBoundary { ) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -175,11 +175,11 @@ impl crate::Loggable for TimeRangeBoundary { }) .collect() }); - UnionArray::new(Self::arrow_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -193,7 +193,7 @@ impl crate::Loggable for TimeRangeBoundary { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -206,7 +206,7 @@ impl crate::Loggable for TimeRangeBoundary { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -306,7 +306,7 @@ impl crate::Loggable for TimeRangeBoundary { 3i8 => Self::Infinite, _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow_datatype(), + Self::arrow2_datatype(), "", *typ as _, )); diff --git a/crates/store/re_types_core/src/datatypes/uint16.rs b/crates/store/re_types_core/src/datatypes/uint16.rs index a89ce8ec4717..e02e98637243 100644 --- a/crates/store/re_types_core/src/datatypes/uint16.rs +++ b/crates/store/re_types_core/src/datatypes/uint16.rs @@ -52,13 +52,13 @@ crate::macros::impl_into_cow!(UInt16); impl crate::Loggable for UInt16 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt16 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -82,7 +82,7 @@ impl crate::Loggable for UInt16 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -90,7 +90,7 @@ impl crate::Loggable for UInt16 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -103,7 +103,7 @@ impl crate::Loggable for UInt16 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -118,7 +118,7 @@ impl crate::Loggable for UInt16 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/uint32.rs b/crates/store/re_types_core/src/datatypes/uint32.rs index 5273ce4dd9a8..61a1e11832fc 100644 --- a/crates/store/re_types_core/src/datatypes/uint32.rs +++ b/crates/store/re_types_core/src/datatypes/uint32.rs @@ -52,13 +52,13 @@ crate::macros::impl_into_cow!(UInt32); impl crate::Loggable for UInt32 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt32 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -82,7 +82,7 @@ impl crate::Loggable for UInt32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -90,7 +90,7 @@ impl crate::Loggable for UInt32 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -103,7 +103,7 @@ impl crate::Loggable for UInt32 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -118,7 +118,7 @@ impl crate::Loggable for UInt32 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/uint64.rs b/crates/store/re_types_core/src/datatypes/uint64.rs index 89d3f2e926fe..83698dfcca6f 100644 --- a/crates/store/re_types_core/src/datatypes/uint64.rs +++ b/crates/store/re_types_core/src/datatypes/uint64.rs @@ -52,13 +52,13 @@ crate::macros::impl_into_cow!(UInt64); impl crate::Loggable for UInt64 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::UInt64 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -82,7 +82,7 @@ impl crate::Loggable for UInt64 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -90,7 +90,7 @@ impl crate::Loggable for UInt64 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -103,7 +103,7 @@ impl crate::Loggable for UInt64 { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -118,7 +118,7 @@ impl crate::Loggable for UInt64 { } #[inline] - fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> + fn from_arrow2(arrow_data: &dyn arrow2::array::Array) -> DeserializationResult> where Self: Sized, { diff --git a/crates/store/re_types_core/src/datatypes/utf8.rs b/crates/store/re_types_core/src/datatypes/utf8.rs index b11a47bde2ed..963eeaf2ef16 100644 --- a/crates/store/re_types_core/src/datatypes/utf8.rs +++ b/crates/store/re_types_core/src/datatypes/utf8.rs @@ -53,13 +53,13 @@ crate::macros::impl_into_cow!(Utf8); impl crate::Loggable for Utf8 { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Utf8 } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -95,7 +95,7 @@ impl crate::Loggable for Utf8 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow_datatype(), + Self::arrow2_datatype(), offsets, inner_data, data0_bitmap, @@ -106,7 +106,7 @@ impl crate::Loggable for Utf8 { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -120,7 +120,7 @@ impl crate::Loggable for Utf8 { .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 ba2522a264a3..0789ac03f64b 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 @@ -44,24 +44,24 @@ crate::macros::impl_into_cow!(VisibleTimeRange); impl crate::Loggable for VisibleTimeRange { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { #![allow(clippy::wildcard_imports)] use arrow2::datatypes::*; DataType::Struct(std::sync::Arc::new(vec![ Field::new( "timeline", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), Field::new( "range", - ::arrow_datatype(), + ::arrow2_datatype(), false, ), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -84,7 +84,7 @@ impl crate::Loggable for VisibleTimeRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow_datatype(), + Self::arrow2_datatype(), vec![ { let (somes, timeline): (Vec<_>, Vec<_>) = data @@ -137,7 +137,7 @@ impl crate::Loggable for VisibleTimeRange { }; { _ = range_bitmap; - crate::datatypes::TimeRange::to_arrow_opt(range)? + crate::datatypes::TimeRange::to_arrow2_opt(range)? } }, ], @@ -147,7 +147,7 @@ impl crate::Loggable for VisibleTimeRange { }) } - fn from_arrow_opt( + fn from_arrow2_opt( arrow_data: &dyn arrow2::array::Array, ) -> DeserializationResult>> where @@ -161,7 +161,7 @@ impl crate::Loggable for VisibleTimeRange { .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow_datatype(); + let expected = Self::arrow2_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -179,7 +179,7 @@ impl crate::Loggable for VisibleTimeRange { let timeline = { if !arrays_by_name.contains_key("timeline") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "timeline", )) .with_context("rerun.datatypes.VisibleTimeRange"); @@ -232,13 +232,13 @@ impl crate::Loggable for VisibleTimeRange { let range = { if !arrays_by_name.contains_key("range") { return Err(DeserializationError::missing_struct_field( - Self::arrow_datatype(), + Self::arrow2_datatype(), "range", )) .with_context("rerun.datatypes.VisibleTimeRange"); } let arrow_data = &**arrays_by_name["range"]; - crate::datatypes::TimeRange::from_arrow_opt(arrow_data) + crate::datatypes::TimeRange::from_arrow2_opt(arrow_data) .with_context("rerun.datatypes.VisibleTimeRange#range")? .into_iter() }; diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index d18c09ed3c72..0c42840936d5 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -17,7 +17,7 @@ use crate::{Archetype, ComponentBatch, LoggableBatch}; /// which makes it possible to work with lists' worth of data in a generic fashion. pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// The underlying [`arrow2::datatypes::DataType`], excluding datatype extensions. - fn arrow_datatype() -> arrow2::datatypes::DataType; + fn arrow2_datatype() -> arrow2::datatypes::DataType; /// Given an iterator of options of owned or reference values to the current /// [`Loggable`], serializes them into an Arrow array. @@ -25,7 +25,7 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// When using Rerun's builtin components & datatypes, this can only fail if the data /// exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, /// 2^63 for large arrays). - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> SerializationResult> where @@ -40,23 +40,23 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// exceeds the maximum number of entries in an Arrow array (2^31 for standard arrays, /// 2^63 for large arrays). #[inline] - fn to_arrow<'a>( + fn to_arrow2<'a>( data: impl IntoIterator>>, ) -> SerializationResult> where Self: 'a, { re_tracing::profile_function!(); - Self::to_arrow_opt(data.into_iter().map(Some)) + Self::to_arrow2_opt(data.into_iter().map(Some)) } // --- Optional deserialization methods --- /// Given an Arrow array, deserializes it into a collection of [`Loggable`]s. #[inline] - fn from_arrow(data: &dyn ::arrow2::array::Array) -> DeserializationResult> { + fn from_arrow2(data: &dyn ::arrow2::array::Array) -> DeserializationResult> { re_tracing::profile_function!(); - Self::from_arrow_opt(data)? + Self::from_arrow2_opt(data)? .into_iter() .map(|opt| { opt.ok_or_else(|| crate::DeserializationError::MissingData { @@ -67,7 +67,7 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { } /// Given an Arrow array, deserializes it into a collection of optional [`Loggable`]s. - fn from_arrow_opt( + fn from_arrow2_opt( data: &dyn ::arrow2::array::Array, ) -> DeserializationResult>> { _ = data; // NOTE: do this here to avoid breaking users' autocomplete snippets diff --git a/crates/store/re_types_core/src/loggable_batch.rs b/crates/store/re_types_core/src/loggable_batch.rs index b51f45807d23..330419a3ac4a 100644 --- a/crates/store/re_types_core/src/loggable_batch.rs +++ b/crates/store/re_types_core/src/loggable_batch.rs @@ -105,7 +105,7 @@ impl<'a> ComponentBatch for MaybeOwnedComponentBatch<'a> { impl LoggableBatch for L { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow([std::borrow::Cow::Borrowed(self)]) + L::to_arrow2([std::borrow::Cow::Borrowed(self)]) } } @@ -120,7 +120,7 @@ impl ComponentBatch for C { impl LoggableBatch for Option { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) + L::to_arrow2(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) } } @@ -136,7 +136,7 @@ impl ComponentBatch for Option { impl LoggableBatch for Vec { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) + L::to_arrow2(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) } } @@ -152,7 +152,7 @@ impl ComponentBatch for Vec { impl LoggableBatch for Vec> { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow_opt( + L::to_arrow2_opt( self.iter() .map(|opt| opt.as_ref().map(|v| std::borrow::Cow::Borrowed(v))), ) @@ -171,7 +171,7 @@ impl ComponentBatch for Vec> { impl LoggableBatch for [L; N] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) + L::to_arrow2(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) } } @@ -187,7 +187,7 @@ impl ComponentBatch for [C; N] { impl LoggableBatch for [Option; N] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow_opt( + L::to_arrow2_opt( self.iter() .map(|opt| opt.as_ref().map(|v| std::borrow::Cow::Borrowed(v))), ) @@ -206,7 +206,7 @@ impl ComponentBatch for [Option; N] { impl<'a, L: Loggable> LoggableBatch for &'a [L] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) + L::to_arrow2(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) } } @@ -222,7 +222,7 @@ impl<'a, C: Component> ComponentBatch for &'a [C] { impl<'a, L: Loggable> LoggableBatch for &'a [Option] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow_opt( + L::to_arrow2_opt( self.iter() .map(|opt| opt.as_ref().map(|v| std::borrow::Cow::Borrowed(v))), ) @@ -241,7 +241,7 @@ impl<'a, C: Component> ComponentBatch for &'a [Option] { impl<'a, L: Loggable, const N: usize> LoggableBatch for &'a [L; N] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) + L::to_arrow2(self.iter().map(|v| std::borrow::Cow::Borrowed(v))) } } @@ -257,7 +257,7 @@ impl<'a, C: Component, const N: usize> ComponentBatch for &'a [C; N] { impl<'a, L: Loggable, const N: usize> LoggableBatch for &'a [Option; N] { #[inline] fn to_arrow(&self) -> SerializationResult> { - L::to_arrow_opt( + L::to_arrow2_opt( self.iter() .map(|opt| opt.as_ref().map(|v| std::borrow::Cow::Borrowed(v))), ) diff --git a/crates/store/re_types_core/src/tuid.rs b/crates/store/re_types_core/src/tuid.rs index 4fa47c682ea7..71e4e1d62bac 100644 --- a/crates/store/re_types_core/src/tuid.rs +++ b/crates/store/re_types_core/src/tuid.rs @@ -19,14 +19,14 @@ impl SizeBytes for Tuid { impl Loggable for Tuid { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { + fn arrow2_datatype() -> arrow2::datatypes::DataType { DataType::Struct(Arc::new(vec![ Field::new("time_ns", DataType::UInt64, false), Field::new("inc", DataType::UInt64, false), ])) } - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( _data: impl IntoIterator>>>, ) -> crate::SerializationResult> where @@ -34,12 +34,12 @@ impl Loggable for Tuid { { Err(crate::SerializationError::not_implemented( Self::NAME, - "TUIDs are never nullable, use `to_arrow()` instead", + "TUIDs are never nullable, use `to_arrow2()` instead", )) } #[inline] - fn to_arrow<'a>( + fn to_arrow2<'a>( data: impl IntoIterator>>, ) -> crate::SerializationResult> where @@ -59,7 +59,7 @@ impl Loggable for Tuid { let datatype = arrow2::datatypes::DataType::Extension( Self::NAME.to_owned(), - Arc::new(Self::arrow_datatype()), + Arc::new(Self::arrow2_datatype()), None, ); @@ -67,8 +67,8 @@ impl Loggable for Tuid { Ok(StructArray::new(datatype, values, validity).boxed()) } - fn from_arrow(array: &dyn ::arrow2::array::Array) -> crate::DeserializationResult> { - let expected_datatype = Self::arrow_datatype(); + fn from_arrow2(array: &dyn ::arrow2::array::Array) -> crate::DeserializationResult> { + let expected_datatype = Self::arrow2_datatype(); let actual_datatype = array.data_type().to_logical_type(); if actual_datatype != &expected_datatype { return Err(DeserializationError::datatype_mismatch( @@ -141,12 +141,12 @@ macro_rules! delegate_arrow_tuid { impl $crate::Loggable for $typ { #[inline] - fn arrow_datatype() -> ::arrow2::datatypes::DataType { - $crate::external::re_tuid::Tuid::arrow_datatype() + fn arrow2_datatype() -> ::arrow2::datatypes::DataType { + $crate::external::re_tuid::Tuid::arrow2_datatype() } #[inline] - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( values: impl IntoIterator>>>, ) -> $crate::SerializationResult> where @@ -154,29 +154,29 @@ macro_rules! delegate_arrow_tuid { { Err($crate::SerializationError::not_implemented( ::name(), - "TUIDs are never nullable, use `to_arrow()` instead", + "TUIDs are never nullable, use `to_arrow2()` instead", )) } #[inline] - fn to_arrow<'a>( + fn to_arrow2<'a>( values: impl IntoIterator>>, ) -> $crate::SerializationResult> { let values = values.into_iter().map(|value| { let value: ::std::borrow::Cow<'a, Self> = value.into(); value.into_owned() }); - <$crate::external::re_tuid::Tuid as $crate::Loggable>::to_arrow( + <$crate::external::re_tuid::Tuid as $crate::Loggable>::to_arrow2( values.into_iter().map(|$typ(tuid)| tuid), ) } #[inline] - fn from_arrow( + fn from_arrow2( array: &dyn arrow2::array::Array, ) -> $crate::DeserializationResult> { Ok( - <$crate::external::re_tuid::Tuid as $crate::Loggable>::from_arrow(array)? + <$crate::external::re_tuid::Tuid as $crate::Loggable>::from_arrow2(array)? .into_iter() .map(|tuid| Self(tuid)) .collect(), diff --git a/crates/top/re_sdk/src/recording_stream.rs b/crates/top/re_sdk/src/recording_stream.rs index a5d86850bbba..2947b98e434e 100644 --- a/crates/top/re_sdk/src/recording_stream.rs +++ b/crates/top/re_sdk/src/recording_stream.rs @@ -2549,7 +2549,7 @@ mod tests { components: [ ( MyPoint::name(), - ::to_arrow([ + ::to_arrow2([ MyPoint::new(10.0, 10.0), MyPoint::new(20.0, 20.0), ]) @@ -2557,12 +2557,13 @@ mod tests { ), // ( MyColor::name(), - ::to_arrow([MyColor(0x8080_80FF)]) + ::to_arrow2([MyColor(0x8080_80FF)]) .unwrap(), ), // ( MyLabel::name(), - ::to_arrow([] as [MyLabel; 0]).unwrap(), + ::to_arrow2([] as [MyLabel; 0]) + .unwrap(), ), // ] .into_iter() @@ -2577,15 +2578,18 @@ mod tests { components: [ ( MyPoint::name(), - ::to_arrow([] as [MyPoint; 0]).unwrap(), + ::to_arrow2([] as [MyPoint; 0]) + .unwrap(), ), // ( MyColor::name(), - ::to_arrow([] as [MyColor; 0]).unwrap(), + ::to_arrow2([] as [MyColor; 0]) + .unwrap(), ), // ( MyLabel::name(), - ::to_arrow([] as [MyLabel; 0]).unwrap(), + ::to_arrow2([] as [MyLabel; 0]) + .unwrap(), ), // ] .into_iter() @@ -2600,16 +2604,17 @@ mod tests { components: [ ( MyPoint::name(), - ::to_arrow([] as [MyPoint; 0]).unwrap(), + ::to_arrow2([] as [MyPoint; 0]) + .unwrap(), ), // ( MyColor::name(), - ::to_arrow([MyColor(0xFFFF_FFFF)]) + ::to_arrow2([MyColor(0xFFFF_FFFF)]) .unwrap(), ), // ( MyLabel::name(), - ::to_arrow([MyLabel("hey".into())]) + ::to_arrow2([MyLabel("hey".into())]) .unwrap(), ), // ] diff --git a/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs b/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs index 658aa527e3bd..8a2c22a138c8 100644 --- a/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs +++ b/crates/viewer/re_component_ui/src/datatype_uis/singleline_string.rs @@ -86,7 +86,7 @@ pub fn display_text_ui( _row_id: Option, data: &dyn arrow2::array::Array, ) { - let text = match Text::from_arrow(data) { + let text = match Text::from_arrow2(data) { Ok(text) => text.first().cloned(), Err(err) => { ui.error_label("Failed to deserialize") @@ -115,7 +115,7 @@ pub fn display_name_ui( _row_id: Option, data: &dyn arrow2::array::Array, ) { - let name = match Name::from_arrow(data) { + let name = match Name::from_arrow2(data) { Ok(name) => name.first().cloned(), Err(err) => { ui.error_label("Failed to deserialize") diff --git a/crates/viewer/re_data_ui/src/component_ui_registry.rs b/crates/viewer/re_data_ui/src/component_ui_registry.rs index b9218eaffaa0..b0c4fab22e6d 100644 --- a/crates/viewer/re_data_ui/src/component_ui_registry.rs +++ b/crates/viewer/re_data_ui/src/component_ui_registry.rs @@ -23,7 +23,7 @@ pub fn add_to_registry(registry: &mut Com registry.add_legacy_display_ui( C::name(), Box::new( - |ctx, ui, ui_layout, query, db, entity_path, row_id, component_raw| match C::from_arrow( + |ctx, ui, ui_layout, query, db, entity_path, row_id, component_raw| match C::from_arrow2( component_raw, ) { Ok(components) => match components.len() { diff --git a/crates/viewer/re_space_view/src/lib.rs b/crates/viewer/re_space_view/src/lib.rs index 2d311a0a21a6..e85ee751a16a 100644 --- a/crates/viewer/re_space_view/src/lib.rs +++ b/crates/viewer/re_space_view/src/lib.rs @@ -55,7 +55,7 @@ pub fn diff_component_filter( .map_or(false, |list_array| { list_array .iter() - .filter_map(|array| array.and_then(|array| T::from_arrow(&*array).ok())) + .filter_map(|array| array.and_then(|array| T::from_arrow2(&*array).ok())) .any(|instances| instances.iter().any(filter)) }) } diff --git a/crates/viewer/re_space_view/src/results_ext.rs b/crates/viewer/re_space_view/src/results_ext.rs index ac9c8e195b5d..c894e27c7fa8 100644 --- a/crates/viewer/re_space_view/src/results_ext.rs +++ b/crates/viewer/re_space_view/src/results_ext.rs @@ -118,7 +118,7 @@ impl<'a> HybridLatestAtResults<'a> { .or_else(|| { // No override, no store, no default -> try fallback instead let raw_fallback = self.fallback_raw(C::name()); - C::from_arrow(raw_fallback.as_ref()) + C::from_arrow2(raw_fallback.as_ref()) .ok() .and_then(|r| r.first().cloned()) }) diff --git a/crates/viewer/re_space_view_spatial/src/max_image_dimension_subscriber.rs b/crates/viewer/re_space_view_spatial/src/max_image_dimension_subscriber.rs index 0e46418faef1..32bc0adc65a4 100644 --- a/crates/viewer/re_space_view_spatial/src/max_image_dimension_subscriber.rs +++ b/crates/viewer/re_space_view_spatial/src/max_image_dimension_subscriber.rs @@ -80,8 +80,9 @@ impl ChunkStoreSubscriber for MaxImageDimensionSubscriber { // Handle `Image`, `DepthImage`, `SegmentationImage`… if let Some(all_dimensions) = event.diff.chunk.components().get(&ImageFormat::name()) { for new_dim in all_dimensions.iter().filter_map(|array| { - array - .and_then(|array| ImageFormat::from_arrow(&*array).ok()?.into_iter().next()) + array.and_then(|array| { + ImageFormat::from_arrow2(&*array).ok()?.into_iter().next() + }) }) { let max_dim = self .max_dimensions @@ -122,10 +123,10 @@ impl ChunkStoreSubscriber for MaxImageDimensionSubscriber { fn size_from_blob(blob: &dyn Array, media_type: Option<&dyn Array>) -> Option<[u32; 2]> { re_tracing::profile_function!(); - let blob = Blob::from_arrow_opt(blob).ok()?.first()?.clone()?; + let blob = Blob::from_arrow2_opt(blob).ok()?.first()?.clone()?; let media_type: Option = media_type - .and_then(|media_type| MediaType::from_arrow_opt(media_type).ok()) + .and_then(|media_type| MediaType::from_arrow2_opt(media_type).ok()) .and_then(|list| list.first().cloned()) .flatten(); diff --git a/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs b/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs index ef3beabbda15..bfe8ac821844 100644 --- a/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs +++ b/crates/viewer/re_space_view_time_series/src/line_visualizer_system.rs @@ -240,7 +240,7 @@ impl SeriesLineSystem { chunk.iter_component_indices(&query.timeline(), &Scalar::name()) }) .map(|(data_time, _)| { - debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); + debug_assert_eq!(Scalar::arrow2_datatype(), ArrowDatatype::Float64); PlotPoint { time: data_time.as_i64(), @@ -254,7 +254,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill values"); - debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); + debug_assert_eq!(Scalar::arrow2_datatype(), ArrowDatatype::Float64); all_scalar_chunks .iter() .flat_map(|chunk| chunk.iter_primitive::(&Scalar::name())) @@ -278,7 +278,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill colors"); - debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32); + debug_assert_eq!(Color::arrow2_datatype(), ArrowDatatype::UInt32); fn map_raw_color(raw: &[u32]) -> Option { raw.first().map(|c| { @@ -331,7 +331,7 @@ impl SeriesLineSystem { { re_tracing::profile_scope!("fill stroke widths"); - debug_assert_eq!(StrokeWidth::arrow_datatype(), ArrowDatatype::Float32); + debug_assert_eq!(StrokeWidth::arrow2_datatype(), ArrowDatatype::Float32); { let all_stroke_width_chunks = results.get_optional_chunks(&StrokeWidth::name()); diff --git a/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs b/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs index f2ec2d3644bd..960c7596e6f0 100644 --- a/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs +++ b/crates/viewer/re_space_view_time_series/src/point_visualizer_system.rs @@ -254,7 +254,7 @@ impl SeriesPointSystem { chunk.iter_component_indices(&query.timeline(), &Scalar::name()) }) .map(|(data_time, _)| { - debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); + debug_assert_eq!(Scalar::arrow2_datatype(), ArrowDatatype::Float64); PlotPoint { time: data_time.as_i64(), @@ -268,7 +268,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill values"); - debug_assert_eq!(Scalar::arrow_datatype(), ArrowDatatype::Float64); + debug_assert_eq!(Scalar::arrow2_datatype(), ArrowDatatype::Float64); let mut i = 0; all_scalar_chunks .iter() @@ -294,7 +294,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill colors"); - debug_assert_eq!(Color::arrow_datatype(), ArrowDatatype::UInt32); + debug_assert_eq!(Color::arrow2_datatype(), ArrowDatatype::UInt32); fn map_raw_color(raw: &[u32]) -> Option { raw.first().map(|c| { @@ -348,7 +348,7 @@ impl SeriesPointSystem { { re_tracing::profile_scope!("fill marker sizes"); - debug_assert_eq!(MarkerSize::arrow_datatype(), ArrowDatatype::Float32); + debug_assert_eq!(MarkerSize::arrow2_datatype(), ArrowDatatype::Float32); { let all_marker_size_chunks = results.get_optional_chunks(&MarkerSize::name()); diff --git a/crates/viewer/re_viewer/src/blueprint/validation.rs b/crates/viewer/re_viewer/src/blueprint/validation.rs index 917613ca34f5..048c4569e2ec 100644 --- a/crates/viewer/re_viewer/src/blueprint/validation.rs +++ b/crates/viewer/re_viewer/src/blueprint/validation.rs @@ -6,13 +6,13 @@ use re_types_core::Component; pub(crate) fn validate_component(blueprint: &EntityDb) -> bool { let engine = blueprint.storage_engine(); if let Some(data_type) = engine.store().lookup_datatype(&C::name()) { - if data_type != &C::arrow_datatype() { + if data_type != &C::arrow2_datatype() { // If the schemas don't match, we definitely have a problem re_log::debug!( "Unexpected datatype for component {:?}.\nFound: {:#?}\nExpected: {:#?}", C::name(), data_type, - C::arrow_datatype() + C::arrow2_datatype() ); return false; } else { @@ -26,7 +26,7 @@ pub(crate) fn validate_component(blueprint: &EntityDb) -> bool { .latest_at(&query, path, [C::name()]) .component_batch_raw(&C::name()) { - if let Err(err) = C::from_arrow_opt(&*array) { + if let Err(err) = C::from_arrow2_opt(&*array) { re_log::debug!( "Failed to deserialize component {:?}: {:?}", C::name(), diff --git a/crates/viewer/re_viewer/src/reflection/mod.rs b/crates/viewer/re_viewer/src/reflection/mod.rs index 9942e6bf65e4..3b30824de84b 100644 --- a/crates/viewer/re_viewer/src/reflection/mod.rs +++ b/crates/viewer/re_viewer/src/reflection/mod.rs @@ -39,7 +39,7 @@ fn generate_component_reflection() -> Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result\n\nThis can only be used as part of blueprints. It will have no effect if used\nin a regular entity.", custom_placeholder: Some(VisualizerOverrides::default().to_arrow()?), - datatype: VisualizerOverrides::arrow_datatype(), + datatype: VisualizerOverrides::arrow2_datatype(), }, ), ( @@ -307,7 +307,7 @@ fn generate_component_reflection() -> Result Result Result Result Result Result Result Result Result Result Resultdepth map scaling factor.\n\nThis measures how many depth map units are in a world unit.\nFor instance, if a depth map uses millimeters and the world uses meters,\nthis value would be `1000`.\n\nNote that the only effect on 2D views is the physical depth values shown when hovering the image.\nIn 3D views on the other hand, this affects where the points of the point cloud are placed.", custom_placeholder: Some(DepthMeter::default().to_arrow()?), - datatype: DepthMeter::arrow_datatype(), + datatype: DepthMeter::arrow2_datatype(), }, ), ( @@ -395,7 +395,7 @@ fn generate_component_reflection() -> Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result.", custom_placeholder: Some(MediaType::default().to_arrow()?), - datatype: MediaType::arrow_datatype(), + datatype: MediaType::arrow2_datatype(), }, ), ( @@ -563,7 +563,7 @@ fn generate_component_reflection() -> Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result Result(value: &dyn arrow2::array::Array) -> Option { let component_name = C::name(); - let deserialized = C::from_arrow(value); + let deserialized = C::from_arrow2(value); match deserialized { Ok(values) => { if values.len() > 1 { diff --git a/crates/viewer/re_viewport_blueprint/src/view_properties.rs b/crates/viewer/re_viewport_blueprint/src/view_properties.rs index b601fc6416b0..2216e84555a1 100644 --- a/crates/viewer/re_viewport_blueprint/src/view_properties.rs +++ b/crates/viewer/re_viewport_blueprint/src/view_properties.rs @@ -103,7 +103,7 @@ impl ViewProperty { view_state: &dyn re_viewer_context::SpaceViewState, ) -> Result, ViewPropertyQueryError> { let component_name = C::name(); - C::from_arrow( + C::from_arrow2( self.component_or_fallback_raw(ctx, component_name, fallback_provider, view_state) .as_ref(), ) @@ -125,7 +125,7 @@ impl ViewProperty { ) -> Result>, DeserializationError> { let component_name = C::name(); self.component_raw(component_name) - .map(|raw| C::from_arrow(raw.as_ref())) + .map(|raw| C::from_arrow2(raw.as_ref())) .transpose() } diff --git a/docs/snippets/all/tutorials/custom_data.rs b/docs/snippets/all/tutorials/custom_data.rs index fa0b4f53ed09..751270bf98f5 100644 --- a/docs/snippets/all/tutorials/custom_data.rs +++ b/docs/snippets/all/tutorials/custom_data.rs @@ -58,18 +58,18 @@ impl rerun::SizeBytes for Confidence { impl rerun::Loggable for Confidence { #[inline] - fn arrow_datatype() -> arrow2::datatypes::DataType { - rerun::Float32::arrow_datatype() + fn arrow2_datatype() -> arrow2::datatypes::DataType { + rerun::Float32::arrow2_datatype() } #[inline] - fn to_arrow_opt<'a>( + fn to_arrow2_opt<'a>( data: impl IntoIterator>>>, ) -> re_types::SerializationResult> where Self: 'a, { - rerun::Float32::to_arrow_opt(data.into_iter().map(|opt| opt.map(Into::into).map(|c| c.0))) + rerun::Float32::to_arrow2_opt(data.into_iter().map(|opt| opt.map(Into::into).map(|c| c.0))) } }