From f9ba68b10c0359c9542f20ed9606cfcc288eb35e Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 22 Nov 2024 14:35:05 +0100 Subject: [PATCH 1/4] Port codegen of arrow datatype to arrow1 --- Cargo.lock | 1 + .../re_types_builder/src/codegen/cpp/mod.rs | 16 +- .../re_types_builder/src/codegen/rust/api.rs | 17 +- .../src/codegen/rust/arrow.rs | 20 +- .../src/codegen/rust/deserializer.rs | 2 +- .../src/codegen/rust/serializer.rs | 26 +- crates/store/re_types/Cargo.toml | 1 + .../src/blueprint/components/active_tab.rs | 4 +- .../blueprint/components/apply_latest_at.rs | 4 +- .../blueprint/components/background_kind.rs | 16 +- .../src/blueprint/components/column_share.rs | 4 +- .../components/component_column_selector.rs | 4 +- .../src/blueprint/components/corner2d.rs | 16 +- .../blueprint/components/filter_by_range.rs | 4 +- .../components/filter_is_not_null.rs | 4 +- .../blueprint/components/included_content.rs | 4 +- .../src/blueprint/components/interactive.rs | 4 +- .../components/lock_range_during_zoom.rs | 4 +- .../src/blueprint/components/map_provider.rs | 16 +- .../src/blueprint/components/panel_state.rs | 16 +- .../blueprint/components/query_expression.rs | 4 +- .../src/blueprint/components/row_share.rs | 4 +- .../blueprint/components/selected_columns.rs | 4 +- .../blueprint/components/space_view_class.rs | 4 +- .../blueprint/components/space_view_origin.rs | 4 +- .../tensor_dimension_index_slider.rs | 4 +- .../src/blueprint/components/timeline_name.rs | 4 +- .../src/blueprint/components/view_fit.rs | 16 +- .../components/viewer_recommendation_hash.rs | 4 +- .../src/blueprint/components/visible.rs | 4 +- .../components/visible_time_range.rs | 4 +- .../blueprint/components/visual_bounds2d.rs | 4 +- .../src/blueprint/components/zoom_level.rs | 4 +- .../datatypes/component_column_selector.rs | 28 +- .../blueprint/datatypes/filter_by_range.rs | 28 +- .../blueprint/datatypes/filter_is_not_null.rs | 26 +- .../blueprint/datatypes/selected_columns.rs | 36 +- .../tensor_dimension_index_slider.rs | 20 +- .../src/components/aggregation_policy.rs | 16 +- .../re_types/src/components/albedo_factor.rs | 4 +- .../src/components/annotation_context.rs | 16 +- .../re_types/src/components/axis_length.rs | 4 +- crates/store/re_types/src/components/blob.rs | 4 +- .../store/re_types/src/components/class_id.rs | 4 +- crates/store/re_types/src/components/color.rs | 4 +- .../store/re_types/src/components/colormap.rs | 16 +- .../re_types/src/components/depth_meter.rs | 4 +- .../src/components/disconnected_space.rs | 4 +- .../re_types/src/components/draw_order.rs | 4 +- .../re_types/src/components/entity_path.rs | 4 +- .../re_types/src/components/fill_mode.rs | 16 +- .../re_types/src/components/fill_ratio.rs | 4 +- .../src/components/gamma_correction.rs | 4 +- .../src/components/geo_line_string.rs | 25 +- .../re_types/src/components/half_size2d.rs | 4 +- .../re_types/src/components/half_size3d.rs | 4 +- .../re_types/src/components/image_buffer.rs | 4 +- .../re_types/src/components/image_format.rs | 4 +- .../src/components/image_plane_distance.rs | 4 +- .../re_types/src/components/keypoint_id.rs | 4 +- .../store/re_types/src/components/lat_lon.rs | 4 +- .../store/re_types/src/components/length.rs | 4 +- .../re_types/src/components/line_strip2d.rs | 25 +- .../re_types/src/components/line_strip3d.rs | 25 +- .../src/components/magnification_filter.rs | 16 +- .../re_types/src/components/marker_shape.rs | 16 +- .../re_types/src/components/marker_size.rs | 4 +- .../re_types/src/components/media_type.rs | 4 +- crates/store/re_types/src/components/name.rs | 4 +- .../store/re_types/src/components/opacity.rs | 4 +- .../src/components/pinhole_projection.rs | 4 +- .../components/pose_rotation_axis_angle.rs | 4 +- .../src/components/pose_rotation_quat.rs | 4 +- .../re_types/src/components/pose_scale3d.rs | 4 +- .../src/components/pose_transform_mat3x3.rs | 4 +- .../src/components/pose_translation3d.rs | 4 +- .../re_types/src/components/position2d.rs | 4 +- .../re_types/src/components/position3d.rs | 4 +- .../store/re_types/src/components/radius.rs | 4 +- .../store/re_types/src/components/range1d.rs | 4 +- .../re_types/src/components/resolution.rs | 4 +- .../src/components/rotation_axis_angle.rs | 4 +- .../re_types/src/components/rotation_quat.rs | 4 +- .../store/re_types/src/components/scalar.rs | 4 +- .../store/re_types/src/components/scale3d.rs | 4 +- .../re_types/src/components/show_labels.rs | 4 +- .../re_types/src/components/stroke_width.rs | 4 +- .../re_types/src/components/tensor_data.rs | 4 +- .../tensor_dimension_index_selection.rs | 4 +- .../src/components/tensor_height_dimension.rs | 4 +- .../src/components/tensor_width_dimension.rs | 4 +- .../re_types/src/components/texcoord2d.rs | 4 +- crates/store/re_types/src/components/text.rs | 4 +- .../re_types/src/components/text_log_level.rs | 4 +- .../src/components/transform_mat3x3.rs | 4 +- .../src/components/transform_relation.rs | 16 +- .../re_types/src/components/translation3d.rs | 4 +- .../src/components/triangle_indices.rs | 4 +- .../re_types/src/components/value_range.rs | 4 +- .../store/re_types/src/components/vector2d.rs | 4 +- .../store/re_types/src/components/vector3d.rs | 4 +- .../src/components/video_timestamp.rs | 4 +- .../src/components/view_coordinates.rs | 4 +- crates/store/re_types/src/datatypes/angle.rs | 17 +- .../re_types/src/datatypes/annotation_info.rs | 32 +- crates/store/re_types/src/datatypes/blob.rs | 22 +- .../src/datatypes/channel_datatype.rs | 16 +- .../src/datatypes/class_description.rs | 42 +-- .../datatypes/class_description_map_elem.rs | 26 +- .../store/re_types/src/datatypes/class_id.rs | 17 +- .../re_types/src/datatypes/color_model.rs | 16 +- crates/store/re_types/src/datatypes/dvec2d.rs | 23 +- .../re_types/src/datatypes/image_format.rs | 36 +- .../re_types/src/datatypes/keypoint_id.rs | 17 +- .../re_types/src/datatypes/keypoint_pair.rs | 28 +- crates/store/re_types/src/datatypes/mat3x3.rs | 23 +- crates/store/re_types/src/datatypes/mat4x4.rs | 23 +- .../re_types/src/datatypes/pixel_format.rs | 16 +- .../re_types/src/datatypes/quaternion.rs | 23 +- .../store/re_types/src/datatypes/range1d.rs | 23 +- .../store/re_types/src/datatypes/range2d.rs | 42 +-- crates/store/re_types/src/datatypes/rgba32.rs | 17 +- .../src/datatypes/rotation_axis_angle.rs | 35 +- .../re_types/src/datatypes/tensor_buffer.rs | 315 ++++++++++-------- .../re_types/src/datatypes/tensor_data.rs | 31 +- .../src/datatypes/tensor_dimension.rs | 24 +- .../tensor_dimension_index_selection.rs | 24 +- .../datatypes/tensor_dimension_selection.rs | 24 +- crates/store/re_types/src/datatypes/uuid.rs | 23 +- crates/store/re_types/src/datatypes/uvec2d.rs | 23 +- crates/store/re_types/src/datatypes/uvec3d.rs | 23 +- crates/store/re_types/src/datatypes/uvec4d.rs | 23 +- crates/store/re_types/src/datatypes/vec2d.rs | 23 +- crates/store/re_types/src/datatypes/vec3d.rs | 23 +- crates/store/re_types/src/datatypes/vec4d.rs | 23 +- .../re_types/src/datatypes/video_timestamp.rs | 17 +- .../src/datatypes/view_coordinates.rs | 23 +- .../src/testing/components/affix_fuzzer1.rs | 4 +- .../src/testing/components/affix_fuzzer10.rs | 14 +- .../src/testing/components/affix_fuzzer11.rs | 22 +- .../src/testing/components/affix_fuzzer12.rs | 16 +- .../src/testing/components/affix_fuzzer13.rs | 16 +- .../src/testing/components/affix_fuzzer14.rs | 4 +- .../src/testing/components/affix_fuzzer15.rs | 54 +-- .../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 | 4 +- .../src/testing/components/affix_fuzzer2.rs | 4 +- .../src/testing/components/affix_fuzzer20.rs | 4 +- .../src/testing/components/affix_fuzzer21.rs | 4 +- .../src/testing/components/affix_fuzzer22.rs | 14 +- .../src/testing/components/affix_fuzzer23.rs | 16 +- .../src/testing/components/affix_fuzzer3.rs | 4 +- .../src/testing/components/affix_fuzzer4.rs | 14 +- .../src/testing/components/affix_fuzzer5.rs | 14 +- .../src/testing/components/affix_fuzzer6.rs | 14 +- .../src/testing/components/affix_fuzzer7.rs | 16 +- .../src/testing/components/affix_fuzzer8.rs | 14 +- .../src/testing/components/affix_fuzzer9.rs | 14 +- .../src/testing/datatypes/affix_fuzzer1.rs | 61 ++-- .../src/testing/datatypes/affix_fuzzer2.rs | 14 +- .../src/testing/datatypes/affix_fuzzer20.rs | 28 +- .../src/testing/datatypes/affix_fuzzer21.rs | 27 +- .../src/testing/datatypes/affix_fuzzer22.rs | 29 +- .../src/testing/datatypes/affix_fuzzer3.rs | 88 ++--- .../src/testing/datatypes/affix_fuzzer4.rs | 67 ++-- .../src/testing/datatypes/affix_fuzzer5.rs | 20 +- .../src/testing/datatypes/enum_test.rs | 16 +- .../src/testing/datatypes/flattened_scalar.rs | 20 +- .../src/testing/datatypes/multi_enum.rs | 24 +- .../testing/datatypes/primitive_component.rs | 17 +- .../src/testing/datatypes/string_component.rs | 14 +- .../src/testing/datatypes/valued_enum.rs | 16 +- .../src/blueprint/components/auto_layout.rs | 4 +- .../blueprint/components/auto_space_views.rs | 4 +- .../blueprint/components/container_kind.rs | 16 +- .../src/blueprint/components/grid_columns.rs | 4 +- .../components/included_space_view.rs | 4 +- .../blueprint/components/root_container.rs | 4 +- .../components/space_view_maximized.rs | 4 +- .../components/visualizer_overrides.rs | 4 +- .../src/blueprint/datatypes/utf8list.rs | 16 +- .../src/components/clear_is_recursive.rs | 4 +- .../store/re_types_core/src/datatypes/bool.rs | 14 +- .../src/datatypes/entity_path.rs | 14 +- .../re_types_core/src/datatypes/float32.rs | 17 +- .../re_types_core/src/datatypes/float64.rs | 17 +- .../re_types_core/src/datatypes/time_int.rs | 17 +- .../re_types_core/src/datatypes/time_range.rs | 24 +- .../src/datatypes/time_range_boundary.rs | 62 ++-- .../re_types_core/src/datatypes/uint16.rs | 17 +- .../re_types_core/src/datatypes/uint32.rs | 17 +- .../re_types_core/src/datatypes/uint64.rs | 17 +- .../store/re_types_core/src/datatypes/utf8.rs | 14 +- .../src/datatypes/visible_time_range.rs | 26 +- crates/store/re_types_core/src/loggable.rs | 6 +- crates/store/re_types_core/src/result.rs | 24 +- 198 files changed, 1669 insertions(+), 1341 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4409be78b369..dbb9180cd917 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6264,6 +6264,7 @@ version = "0.21.0-alpha.1+dev" dependencies = [ "anyhow", "array-init", + "arrow", "bytemuck", "document-features", "ecolor", diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index 72f69ca160da..a588e17151d6 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -7,7 +7,7 @@ use std::collections::HashSet; use camino::{Utf8Path, Utf8PathBuf}; use itertools::Itertools; -use proc_macro2::{Ident, TokenStream}; +use proc_macro2::{Ident, Literal, TokenStream}; use quote::{format_ident, quote}; use rayon::prelude::*; @@ -1241,7 +1241,7 @@ impl QuotedObject { let field_name = field_name_identifier(obj_field); // We assign the arrow type index to the enum fields to make encoding simpler and faster: - let arrow_type_index = proc_macro2::Literal::usize_unsuffixed(enum_value as _); + let arrow_type_index = Literal::usize_unsuffixed(enum_value as _); quote! { #NEWLINE_TOKEN @@ -1417,7 +1417,7 @@ fn arrow_data_type_method( cpp_includes.insert_system("arrow/type_fwd.h"); hpp_declarations.insert("arrow", ForwardDecl::Class(format_ident!("DataType"))); - let quoted_datatype = quote_arrow_data_type( + let quoted_datatype = quote_arrow_datatype( &Type::Object(obj.fqname.clone()), objects, cpp_includes, @@ -2234,7 +2234,7 @@ fn quote_field_type(includes: &mut Includes, obj_field: &ObjectField) -> TokenSt Type::Array { elem_type, length } => { includes.insert_system("array"); let elem_type = quote_element_type(includes, elem_type); - let length = proc_macro2::Literal::usize_unsuffixed(*length); + let length = Literal::usize_unsuffixed(*length); quote! { std::array<#elem_type, #length> } } Type::Vector { elem_type } => { @@ -2401,7 +2401,7 @@ fn quote_integer(t: T) -> TokenStream { quote!(#t) } -fn quote_arrow_data_type( +fn quote_arrow_datatype( typ: &Type, objects: &Objects, includes: &mut Includes, @@ -2444,7 +2444,7 @@ fn quote_arrow_data_type( let quoted_fqname = quote_fqname_as_type_path(includes, fqname); quote!(Loggable<#quoted_fqname>::arrow_datatype()) } else if obj.is_arrow_transparent() { - quote_arrow_data_type(&obj.fields[0].typ, objects, includes, false) + quote_arrow_datatype(&obj.fields[0].typ, objects, includes, false) } else { let quoted_fields = obj .fields @@ -2480,7 +2480,7 @@ fn quote_arrow_field_type( includes: &mut Includes, ) -> TokenStream { let name = &field.name; - let datatype = quote_arrow_data_type(&field.typ, objects, includes, false); + let datatype = quote_arrow_datatype(&field.typ, objects, includes, false); let is_nullable = field.is_nullable || field.typ == Type::Unit; // null type is always nullable quote! { @@ -2494,7 +2494,7 @@ fn quote_arrow_elem_type( includes: &mut Includes, ) -> TokenStream { let typ: Type = elem_type.clone().into(); - let datatype = quote_arrow_data_type(&typ, objects, includes, false); + let datatype = quote_arrow_datatype(&typ, objects, includes, false); let is_nullable = typ == Type::Unit; // null type must be nullable quote! { arrow::field("item", #datatype, #is_nullable) 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 28510ccadcbe..beefef0528f9 100644 --- a/crates/build/re_types_builder/src/codegen/rust/api.rs +++ b/crates/build/re_types_builder/src/codegen/rust/api.rs @@ -864,17 +864,17 @@ fn quote_trait_impls_for_datatype_or_component( let quoted_arrow_datatype = if let Some(forwarded_type) = forwarded_type.as_ref() { quote! { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - #forwarded_type::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + #forwarded_type::arrow_datatype() } } } else { let datatype = ArrowDataTypeTokenizer(&datatype, false); quote! { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; #datatype } } @@ -906,7 +906,8 @@ fn quote_trait_impls_for_datatype_or_component( // re_tracing::profile_function!(); #![allow(clippy::wildcard_imports)] - use arrow2::{datatypes::*, array::*, buffer::*}; + use arrow::datatypes::*; + use arrow2::{ array::*, buffer::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; // This code-path cannot have null fields. If it does have a validity mask @@ -948,7 +949,8 @@ fn quote_trait_impls_for_datatype_or_component( // re_tracing::profile_function!(); #![allow(clippy::wildcard_imports)] - use arrow2::{datatypes::*, array::*, buffer::*}; + use arrow::datatypes::*; + use arrow2::{ array::*, buffer::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; Ok(#quoted_deserializer) } @@ -987,7 +989,8 @@ fn quote_trait_impls_for_datatype_or_component( #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] - use arrow2::{datatypes::*, array::*}; + use arrow::datatypes::*; + use arrow2::array::*; use ::re_types_core::{Loggable as _, ResultExt as _}; Ok(#quoted_serializer) 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 82509d5ae255..3d5e5ed978cc 100644 --- a/crates/build/re_types_builder/src/codegen/rust/arrow.rs +++ b/crates/build/re_types_builder/src/codegen/rust/arrow.rs @@ -1,5 +1,5 @@ use arrow2::datatypes::DataType; -use proc_macro2::TokenStream; +use proc_macro2::{Literal, TokenStream}; use quote::quote; // --- @@ -37,6 +37,7 @@ impl quote::ToTokens for ArrowDataTypeTokenizer<'_> { DataType::FixedSizeList(field, length) => { let field = ArrowFieldTokenizer(field); + let length = Literal::usize_unsuffixed(*length); quote!(DataType::FixedSizeList(std::sync::Arc::new(#field), #length)) } @@ -47,25 +48,32 @@ impl quote::ToTokens for ArrowDataTypeTokenizer<'_> { UnionMode::Sparse => quote!(UnionMode::Sparse), }; if let Some(types) = types { + let types = types.iter().map(|&t| { + Literal::i8_unsuffixed(i8::try_from(t).unwrap_or_else(|_| { + panic!("Expect union type tag to be in 0-127; got {t}") + })) + }); quote!(DataType::Union( - std::sync::Arc::new(vec![ #(#fields,)* ]), - Some(std::sync::Arc::new(vec![ #(#types,)* ])), + UnionFields::new( + vec![ #(#types,)* ], + vec![ #(#fields,)* ], + ), #mode, )) } else { - quote!(DataType::Union(std::sync::Arc::new(vec![ #(#fields,)* ]), None, #mode)) + quote!(DataType::Union(UnionFields::from(vec![ #(#fields,)* ]), #mode)) } } DataType::Struct(fields) => { let fields = fields.iter().map(ArrowFieldTokenizer); - quote!(DataType::Struct(std::sync::Arc::new(vec![ #(#fields,)* ]))) + quote!(DataType::Struct(Fields::from(vec![ #(#fields,)* ]))) } DataType::Extension(fqname, datatype, _metadata) => { if *recursive { let fqname_use = quote_fqname_as_type_path(fqname); - quote!(<#fqname_use>::arrow2_datatype()) + quote!(<#fqname_use>::arrow_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 5e54a58c939f..b8d1f56fdf8d 100644 --- a/crates/build/re_types_builder/src/codegen/rust/deserializer.rs +++ b/crates/build/re_types_builder/src/codegen/rust/deserializer.rs @@ -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::arrow2_datatype() }; + let quoted_self_datatype = quote! { Self::arrow_datatype() }; let obj_fqname = obj.fqname.as_str(); let is_enum = obj.is_enum(); 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 5ba080586948..31d28f71b95f 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::arrow2_datatype() }; + let quoted_datatype = quote! { Self::arrow_datatype() }; let is_enum = obj.is_enum(); let is_arrow_transparent = obj.datatype.is_none(); @@ -211,7 +211,7 @@ pub fn quote_arrow_serializer( #quoted_bitmap; StructArray::new( - #quoted_datatype, + #quoted_datatype.into(), vec![#(#quoted_field_serializers,)*], bitmap, ).boxed() @@ -257,14 +257,14 @@ pub fn quote_arrow_serializer( let fields: Vec<_> = std::iter::repeat( NullArray::new( - DataType::Null, + arrow2::datatypes::DataType::Null, #data_src.len(), ).boxed() ).take(1 + num_variants) // +1 for the virtual `nulls` arm .collect(); UnionArray::new( - #quoted_datatype, + #quoted_datatype.into(), types, fields, None, @@ -290,7 +290,7 @@ pub fn quote_arrow_serializer( if obj_field.typ == crate::Type::Unit { return quote! { NullArray::new( - DataType::Null, + arrow2::datatypes::DataType::Null, #data_src .iter() .filter(|datum| matches!(datum.as_deref(), Some(Self::#quoted_obj_field_name))) @@ -336,7 +336,7 @@ pub fn quote_arrow_serializer( let quoted_fields = quote! { vec![ NullArray::new( - DataType::Null, + arrow2::datatypes::DataType::Null, #data_src.iter().filter(|v| v.is_none()).count(), ).boxed(), #(#quoted_field_serializers,)* @@ -426,7 +426,7 @@ pub fn quote_arrow_serializer( let offsets = Some(#quoted_offsets); UnionArray::new( - #quoted_datatype, + #quoted_datatype.into(), types, fields, offsets, @@ -547,7 +547,7 @@ fn quote_arrow_field_serializer( if datatype.to_logical_type() == &DataType::Boolean { quote! { BooleanArray::new( - #quoted_datatype, + #quoted_datatype.into(), #data_src.into_iter() #quoted_transparent_mapping .collect(), #bitmap_src, ).boxed() @@ -558,14 +558,14 @@ fn quote_arrow_field_serializer( // to a buffer type. InnerRepr::ArrowBuffer => quote! { PrimitiveArray::new( - #quoted_datatype, + #quoted_datatype.into(), #data_src, #bitmap_src, ).boxed() }, InnerRepr::NativeIterable => quote! { PrimitiveArray::new( - #quoted_datatype, + #quoted_datatype.into(), #data_src.into_iter() #quoted_transparent_mapping .collect(), #bitmap_src, ).boxed() @@ -654,7 +654,7 @@ fn quote_arrow_field_serializer( // It would be nice to use quote_comment here and put this safety notice in the generated code, // but that seems to push us over some complexity limit causing rustfmt to fail. #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] - unsafe { Utf8Array::::new_unchecked(#quoted_datatype, offsets, inner_data, #bitmap_src) }.boxed() + unsafe { Utf8Array::::new_unchecked(#quoted_datatype.into(), offsets, inner_data, #bitmap_src) }.boxed() }} } @@ -809,7 +809,7 @@ fn quote_arrow_field_serializer( let quoted_create = if let DataType::List(_) = datatype { quote! { ListArray::try_new( - #quoted_datatype, + #quoted_datatype.into(), offsets, #quoted_inner, #bitmap_src, @@ -818,7 +818,7 @@ fn quote_arrow_field_serializer( } else { quote! { FixedSizeListArray::new( - #quoted_datatype, + #quoted_datatype.into(), #quoted_inner, #bitmap_src, ).boxed() diff --git a/crates/store/re_types/Cargo.toml b/crates/store/re_types/Cargo.toml index 022912fc5e96..94caec927202 100644 --- a/crates/store/re_types/Cargo.toml +++ b/crates/store/re_types/Cargo.toml @@ -62,6 +62,7 @@ re_video = { workspace = true, optional = true } # External anyhow.workspace = true # TODO(#1845): Use thiserror instead array-init.workspace = true +arrow.workspace = true arrow2 = { workspace = true, features = [ "io_ipc", "io_print", 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 462a62ffe13c..d372ddddb791 100644 --- a/crates/store/re_types/src/blueprint/components/active_tab.rs +++ b/crates/store/re_types/src/blueprint/components/active_tab.rs @@ -72,8 +72,8 @@ impl std::ops::DerefMut for ActiveTab { impl ::re_types_core::Loggable for ActiveTab { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::EntityPath::arrow_datatype() } fn to_arrow2_opt<'a>( 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 60662eaab1d7..440068bdec6d 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,8 +68,8 @@ impl std::ops::DerefMut for ApplyLatestAt { impl ::re_types_core::Loggable for ApplyLatestAt { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 5d1ab542b8d0..c993bcbd6f35 100644 --- a/crates/store/re_types/src/blueprint/components/background_kind.rs +++ b/crates/store/re_types/src/blueprint/components/background_kind.rs @@ -84,9 +84,9 @@ impl std::fmt::Display for BackgroundKind { impl ::re_types_core::Loggable for BackgroundKind { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -99,7 +99,8 @@ impl ::re_types_core::Loggable for BackgroundKind { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -114,7 +115,7 @@ impl ::re_types_core::Loggable for BackgroundKind { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -130,12 +131,13 @@ impl ::re_types_core::Loggable for BackgroundKind { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -148,7 +150,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::arrow2_datatype(), + Self::arrow_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 57896a6535e7..e23a7d39cc3e 100644 --- a/crates/store/re_types/src/blueprint/components/column_share.rs +++ b/crates/store/re_types/src/blueprint/components/column_share.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for ColumnShare { impl ::re_types_core::Loggable for ColumnShare { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( 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 d595fea9d2dd..39675fda0703 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,8 +72,8 @@ impl std::ops::DerefMut for ComponentColumnSelector { impl ::re_types_core::Loggable for ComponentColumnSelector { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::ComponentColumnSelector::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::ComponentColumnSelector::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/blueprint/components/corner2d.rs b/crates/store/re_types/src/blueprint/components/corner2d.rs index 1a4505e61f77..62d9e96351c6 100644 --- a/crates/store/re_types/src/blueprint/components/corner2d.rs +++ b/crates/store/re_types/src/blueprint/components/corner2d.rs @@ -86,9 +86,9 @@ impl std::fmt::Display for Corner2D { impl ::re_types_core::Loggable for Corner2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -101,7 +101,8 @@ impl ::re_types_core::Loggable for Corner2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -116,7 +117,7 @@ impl ::re_types_core::Loggable for Corner2D { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -132,12 +133,13 @@ impl ::re_types_core::Loggable for Corner2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -151,7 +153,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::arrow2_datatype(), + Self::arrow_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 b1658d9e43c0..4538c20fd6ac 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,8 +68,8 @@ impl std::ops::DerefMut for FilterByRange { impl ::re_types_core::Loggable for FilterByRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::FilterByRange::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::FilterByRange::arrow_datatype() } fn to_arrow2_opt<'a>( 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 4628de994d9e..fa8a3c20851a 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,8 +68,8 @@ impl std::ops::DerefMut for FilterIsNotNull { impl ::re_types_core::Loggable for FilterIsNotNull { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::FilterIsNotNull::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::FilterIsNotNull::arrow_datatype() } fn to_arrow2_opt<'a>( 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 5cf6e082812c..fd5ca2170ae2 100644 --- a/crates/store/re_types/src/blueprint/components/included_content.rs +++ b/crates/store/re_types/src/blueprint/components/included_content.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for IncludedContent { impl ::re_types_core::Loggable for IncludedContent { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::EntityPath::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/blueprint/components/interactive.rs b/crates/store/re_types/src/blueprint/components/interactive.rs index d3b7e62ed8e8..4fbec8d71dc6 100644 --- a/crates/store/re_types/src/blueprint/components/interactive.rs +++ b/crates/store/re_types/src/blueprint/components/interactive.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for Interactive { impl ::re_types_core::Loggable for Interactive { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 32beda76206d..13280b5e1e2a 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,8 +70,8 @@ impl std::ops::DerefMut for LockRangeDuringZoom { impl ::re_types_core::Loggable for LockRangeDuringZoom { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 96e643f58c00..0de6496dcf70 100644 --- a/crates/store/re_types/src/blueprint/components/map_provider.rs +++ b/crates/store/re_types/src/blueprint/components/map_provider.rs @@ -86,9 +86,9 @@ impl std::fmt::Display for MapProvider { impl ::re_types_core::Loggable for MapProvider { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -101,7 +101,8 @@ impl ::re_types_core::Loggable for MapProvider { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -116,7 +117,7 @@ impl ::re_types_core::Loggable for MapProvider { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -132,12 +133,13 @@ impl ::re_types_core::Loggable for MapProvider { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -151,7 +153,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::arrow2_datatype(), + Self::arrow_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 ebdc60024175..2b9decb690b8 100644 --- a/crates/store/re_types/src/blueprint/components/panel_state.rs +++ b/crates/store/re_types/src/blueprint/components/panel_state.rs @@ -76,9 +76,9 @@ impl std::fmt::Display for PanelState { impl ::re_types_core::Loggable for PanelState { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -91,7 +91,8 @@ impl ::re_types_core::Loggable for PanelState { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,7 +107,7 @@ impl ::re_types_core::Loggable for PanelState { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -122,12 +123,13 @@ impl ::re_types_core::Loggable for PanelState { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -140,7 +142,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::arrow2_datatype(), + Self::arrow_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 71984913fd3b..41549031ce0a 100644 --- a/crates/store/re_types/src/blueprint/components/query_expression.rs +++ b/crates/store/re_types/src/blueprint/components/query_expression.rs @@ -77,8 +77,8 @@ impl std::ops::DerefMut for QueryExpression { impl ::re_types_core::Loggable for QueryExpression { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( 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 2ac3a7fad68d..cc75f807a264 100644 --- a/crates/store/re_types/src/blueprint/components/row_share.rs +++ b/crates/store/re_types/src/blueprint/components/row_share.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for RowShare { impl ::re_types_core::Loggable for RowShare { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( 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 c8bb696c7d2b..1290721b396f 100644 --- a/crates/store/re_types/src/blueprint/components/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/components/selected_columns.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for SelectedColumns { impl ::re_types_core::Loggable for SelectedColumns { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::SelectedColumns::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::SelectedColumns::arrow_datatype() } fn to_arrow2_opt<'a>( 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 a236ec277dc6..7e17ee0bd137 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,8 +68,8 @@ impl std::ops::DerefMut for SpaceViewClass { impl ::re_types_core::Loggable for SpaceViewClass { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( 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 8e5afbb5b7e2..b3e01469cad5 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,8 +68,8 @@ impl std::ops::DerefMut for SpaceViewOrigin { impl ::re_types_core::Loggable for SpaceViewOrigin { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::EntityPath::arrow_datatype() } fn to_arrow2_opt<'a>( 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 e33dd858eca8..db8295ed7625 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,8 +72,8 @@ impl std::ops::DerefMut for TensorDimensionIndexSlider { impl ::re_types_core::Loggable for TensorDimensionIndexSlider { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::TensorDimensionIndexSlider::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::TensorDimensionIndexSlider::arrow_datatype() } fn to_arrow2_opt<'a>( 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 2b1720dd8ab0..b8efd276ac94 100644 --- a/crates/store/re_types/src/blueprint/components/timeline_name.rs +++ b/crates/store/re_types/src/blueprint/components/timeline_name.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for TimelineName { impl ::re_types_core::Loggable for TimelineName { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( 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 dbe3f4a5c3a5..c0a6f9e10f19 100644 --- a/crates/store/re_types/src/blueprint/components/view_fit.rs +++ b/crates/store/re_types/src/blueprint/components/view_fit.rs @@ -82,9 +82,9 @@ impl std::fmt::Display for ViewFit { impl ::re_types_core::Loggable for ViewFit { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -97,7 +97,8 @@ impl ::re_types_core::Loggable for ViewFit { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -112,7 +113,7 @@ impl ::re_types_core::Loggable for ViewFit { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -128,12 +129,13 @@ impl ::re_types_core::Loggable for ViewFit { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +148,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::arrow2_datatype(), + Self::arrow_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 c1c4e50af4d2..ea8a3ec28da2 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,8 +70,8 @@ impl std::ops::DerefMut for ViewerRecommendationHash { impl ::re_types_core::Loggable for ViewerRecommendationHash { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UInt64::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::UInt64::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/blueprint/components/visible.rs b/crates/store/re_types/src/blueprint/components/visible.rs index 009963f2c3b2..0abcf7cc4dda 100644 --- a/crates/store/re_types/src/blueprint/components/visible.rs +++ b/crates/store/re_types/src/blueprint/components/visible.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Visible { impl ::re_types_core::Loggable for Visible { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 6c003f3b503b..462bfae52d23 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,8 +70,8 @@ impl std::ops::DerefMut for VisibleTimeRange { impl ::re_types_core::Loggable for VisibleTimeRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::VisibleTimeRange::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::VisibleTimeRange::arrow_datatype() } fn to_arrow2_opt<'a>( 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 3a57b91aa109..2db4a32793fa 100644 --- a/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs +++ b/crates/store/re_types/src/blueprint/components/visual_bounds2d.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for VisualBounds2D { impl ::re_types_core::Loggable for VisualBounds2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Range2D::arrow_datatype() } fn to_arrow2_opt<'a>( 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 f20294a830c1..4d1b883f30f4 100644 --- a/crates/store/re_types/src/blueprint/components/zoom_level.rs +++ b/crates/store/re_types/src/blueprint/components/zoom_level.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for ZoomLevel { impl ::re_types_core::Loggable for ZoomLevel { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float64::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float64::arrow_datatype() } fn to_arrow2_opt<'a>( 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 e06c354774bb..580c81ac7be7 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,18 +44,18 @@ impl ::re_types_core::SizeBytes for ComponentColumnSelector { impl ::re_types_core::Loggable for ComponentColumnSelector { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "entity_path", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "component", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -70,7 +70,8 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +85,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, entity_path): (Vec<_>, Vec<_>) = data @@ -114,7 +115,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, entity_path_bitmap, @@ -151,7 +152,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, component_bitmap, @@ -175,13 +176,14 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -199,7 +201,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::arrow2_datatype(), + Self::arrow_datatype(), "entity_path", )) .with_context("rerun.blueprint.datatypes.ComponentColumnSelector"); @@ -258,7 +260,7 @@ impl ::re_types_core::Loggable for ComponentColumnSelector { let component = { if !arrays_by_name.contains_key("component") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 e818f93c14df..56548ef92a32 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,16 +44,16 @@ impl ::re_types_core::SizeBytes for FilterByRange { impl ::re_types_core::Loggable for FilterByRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "start", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), - Field::new("end", ::arrow2_datatype(), false), + Field::new("end", ::arrow_datatype(), false), ])) } @@ -66,7 +66,8 @@ impl ::re_types_core::Loggable for FilterByRange { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -80,7 +81,7 @@ impl ::re_types_core::Loggable for FilterByRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, start): (Vec<_>, Vec<_>) = data @@ -95,7 +96,7 @@ impl ::re_types_core::Loggable for FilterByRange { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Int64, + DataType::Int64.into(), start .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -117,7 +118,7 @@ impl ::re_types_core::Loggable for FilterByRange { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Int64, + DataType::Int64.into(), end.into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) .collect(), @@ -140,13 +141,14 @@ impl ::re_types_core::Loggable for FilterByRange { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -164,7 +166,7 @@ impl ::re_types_core::Loggable for FilterByRange { let start = { if !arrays_by_name.contains_key("start") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "start", )) .with_context("rerun.blueprint.datatypes.FilterByRange"); @@ -186,7 +188,7 @@ impl ::re_types_core::Loggable for FilterByRange { let end = { if !arrays_by_name.contains_key("end") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 61b149cf5e0e..1f1d20ebf0d1 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,14 +45,14 @@ impl ::re_types_core::SizeBytes for FilterIsNotNull { impl ::re_types_core::Loggable for FilterIsNotNull { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ - Field::new("active", ::arrow2_datatype(), false), + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ + Field::new("active", ::arrow_datatype(), false), Field::new( "column", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -67,7 +67,8 @@ impl ::re_types_core::Loggable for FilterIsNotNull { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -81,7 +82,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, active): (Vec<_>, Vec<_>) = data @@ -96,7 +97,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { any_nones.then(|| somes.into()) }; BooleanArray::new( - DataType::Boolean, + DataType::Boolean.into(), active .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -139,13 +140,14 @@ impl ::re_types_core::Loggable for FilterIsNotNull { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -163,7 +165,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { let active = { if !arrays_by_name.contains_key("active") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "active", )) .with_context("rerun.blueprint.datatypes.FilterIsNotNull"); @@ -184,7 +186,7 @@ impl ::re_types_core::Loggable for FilterIsNotNull { let column = { if !arrays_by_name.contains_key("column") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "column", )) .with_context("rerun.blueprint.datatypes.FilterIsNotNull"); 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 e2b26eabbbfd..e2282cbe6a72 100644 --- a/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs +++ b/crates/store/re_types/src/blueprint/datatypes/selected_columns.rs @@ -45,15 +45,15 @@ impl ::re_types_core::SizeBytes for SelectedColumns { impl ::re_types_core::Loggable for SelectedColumns { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "time_columns", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_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", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))), false, @@ -79,7 +79,8 @@ impl ::re_types_core::Loggable for SelectedColumns { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -93,7 +94,7 @@ impl ::re_types_core::Loggable for SelectedColumns { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, time_columns) : (Vec < _ >, Vec < _ >) = data .iter().map(| datum | { let datum = datum.as_ref().map(| datum | @@ -109,7 +110,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 > ::arrow2_datatype(), false))), + < crate ::datatypes::Utf8 > ::arrow_datatype(), false))).into(), offsets, { let offsets = arrow2::offset::Offsets:: < i32 > ::try_from_lengths(time_columns_inner_data.iter().map(| datum | { datum.0.len() })) ? .into(); let inner_data : @@ -117,8 +118,8 @@ impl ::re_types_core::Loggable for SelectedColumns { .into_iter().flat_map(| datum | { datum.0.0 }).collect(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe - { Utf8Array:: < i32 > ::new_unchecked(DataType::Utf8, offsets, - inner_data, time_columns_inner_bitmap) } .boxed() }, + { Utf8Array:: < i32 > ::new_unchecked(DataType::Utf8.into(), + offsets, inner_data, time_columns_inner_bitmap) } .boxed() }, time_columns_bitmap,) ? .boxed() } }, { let (somes, component_columns) : (Vec < _ >, Vec < _ >) = data.iter().map(| datum | { let datum = datum.as_ref().map(| datum | { datum @@ -136,7 +137,7 @@ impl ::re_types_core::Loggable for SelectedColumns { > = None; ListArray::try_new(DataType::List(std::sync::Arc::new(Field::new("item", < crate ::blueprint::datatypes::ComponentColumnSelector > - ::arrow2_datatype(), false))), offsets, { _ = + ::arrow_datatype(), false))).into(), offsets, { _ = component_columns_inner_bitmap; crate ::blueprint::datatypes::ComponentColumnSelector::to_arrow2_opt(component_columns_inner_data .into_iter().map(Some)) ? }, component_columns_bitmap,) ? @@ -156,13 +157,14 @@ impl ::re_types_core::Loggable for SelectedColumns { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -180,7 +182,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::arrow2_datatype(), + Self::arrow_datatype(), "time_columns", )) .with_context("rerun.blueprint.datatypes.SelectedColumns"); @@ -193,7 +195,7 @@ impl ::re_types_core::Loggable for SelectedColumns { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -304,7 +306,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::arrow2_datatype(), + Self::arrow_datatype(), "component_columns", )) .with_context("rerun.blueprint.datatypes.SelectedColumns"); @@ -319,7 +321,7 @@ impl ::re_types_core::Loggable for SelectedColumns { std::sync::Arc::new( Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ), 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 d69ffee86956..4c3c4c1e0d0b 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,10 +55,10 @@ impl From for u32 { impl ::re_types_core::Loggable for TensorDimensionIndexSlider { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![Field::new( + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![Field::new( "dimension", DataType::UInt32, false, @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -88,7 +89,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![{ let (somes, dimension): (Vec<_>, Vec<_>) = data .iter() @@ -102,7 +103,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), dimension .into_iter() .map(|v| v.unwrap_or_default()) @@ -125,13 +126,14 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -149,7 +151,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSlider { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 aab508c386c4..c76c4317ec92 100644 --- a/crates/store/re_types/src/components/aggregation_policy.rs +++ b/crates/store/re_types/src/components/aggregation_policy.rs @@ -108,9 +108,9 @@ impl std::fmt::Display for AggregationPolicy { impl ::re_types_core::Loggable for AggregationPolicy { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -123,7 +123,8 @@ impl ::re_types_core::Loggable for AggregationPolicy { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -138,7 +139,7 @@ impl ::re_types_core::Loggable for AggregationPolicy { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -154,12 +155,13 @@ impl ::re_types_core::Loggable for AggregationPolicy { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -175,7 +177,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::arrow2_datatype(), + Self::arrow_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 24f4ec79a340..d5ebcc94b5e7 100644 --- a/crates/store/re_types/src/components/albedo_factor.rs +++ b/crates/store/re_types/src/components/albedo_factor.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for AlbedoFactor { impl ::re_types_core::Loggable for AlbedoFactor { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Rgba32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Rgba32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/annotation_context.rs b/crates/store/re_types/src/components/annotation_context.rs index 6fc9228699ad..04a17d807543 100644 --- a/crates/store/re_types/src/components/annotation_context.rs +++ b/crates/store/re_types/src/components/annotation_context.rs @@ -55,12 +55,12 @@ impl, T: IntoIterator arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for AnnotationContext { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -99,7 +100,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { _ = data0_inner_bitmap; @@ -122,13 +123,14 @@ impl ::re_types_core::Loggable for AnnotationContext { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) diff --git a/crates/store/re_types/src/components/axis_length.rs b/crates/store/re_types/src/components/axis_length.rs index b26bb72e5969..52c80dc16e84 100644 --- a/crates/store/re_types/src/components/axis_length.rs +++ b/crates/store/re_types/src/components/axis_length.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for AxisLength { impl ::re_types_core::Loggable for AxisLength { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/blob.rs b/crates/store/re_types/src/components/blob.rs index 6db9bc340c1b..561a6ac5529b 100644 --- a/crates/store/re_types/src/components/blob.rs +++ b/crates/store/re_types/src/components/blob.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for Blob { impl ::re_types_core::Loggable for Blob { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Blob::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Blob::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/class_id.rs b/crates/store/re_types/src/components/class_id.rs index e3ae4921fd25..43d038b2be57 100644 --- a/crates/store/re_types/src/components/class_id.rs +++ b/crates/store/re_types/src/components/class_id.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for ClassId { impl ::re_types_core::Loggable for ClassId { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ClassId::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::ClassId::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/color.rs b/crates/store/re_types/src/components/color.rs index 06a40cb00305..de259fe82e2d 100644 --- a/crates/store/re_types/src/components/color.rs +++ b/crates/store/re_types/src/components/color.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for Color { impl ::re_types_core::Loggable for Color { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Rgba32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Rgba32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/colormap.rs b/crates/store/re_types/src/components/colormap.rs index a81be2d20490..3f01fa78fd88 100644 --- a/crates/store/re_types/src/components/colormap.rs +++ b/crates/store/re_types/src/components/colormap.rs @@ -145,9 +145,9 @@ impl std::fmt::Display for Colormap { impl ::re_types_core::Loggable for Colormap { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -160,7 +160,8 @@ impl ::re_types_core::Loggable for Colormap { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -175,7 +176,7 @@ impl ::re_types_core::Loggable for Colormap { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -191,12 +192,13 @@ impl ::re_types_core::Loggable for Colormap { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -213,7 +215,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::arrow2_datatype(), + Self::arrow_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 987c1d79ed27..a9ffd0b01ead 100644 --- a/crates/store/re_types/src/components/depth_meter.rs +++ b/crates/store/re_types/src/components/depth_meter.rs @@ -75,8 +75,8 @@ impl std::ops::DerefMut for DepthMeter { impl ::re_types_core::Loggable for DepthMeter { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs index f76bda3fe413..2d3f6068a756 100644 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ b/crates/store/re_types/src/components/disconnected_space.rs @@ -79,8 +79,8 @@ impl std::ops::DerefMut for DisconnectedSpace { impl ::re_types_core::Loggable for DisconnectedSpace { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/draw_order.rs b/crates/store/re_types/src/components/draw_order.rs index 76e305157320..c7ab0a195754 100644 --- a/crates/store/re_types/src/components/draw_order.rs +++ b/crates/store/re_types/src/components/draw_order.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for DrawOrder { impl ::re_types_core::Loggable for DrawOrder { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/entity_path.rs b/crates/store/re_types/src/components/entity_path.rs index a3c21e0192fd..d2894dd7813c 100644 --- a/crates/store/re_types/src/components/entity_path.rs +++ b/crates/store/re_types/src/components/entity_path.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for EntityPath { impl ::re_types_core::Loggable for EntityPath { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::EntityPath::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::EntityPath::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/fill_mode.rs b/crates/store/re_types/src/components/fill_mode.rs index f47d88d958c7..8931e51b40c2 100644 --- a/crates/store/re_types/src/components/fill_mode.rs +++ b/crates/store/re_types/src/components/fill_mode.rs @@ -94,9 +94,9 @@ impl std::fmt::Display for FillMode { impl ::re_types_core::Loggable for FillMode { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -109,7 +109,8 @@ impl ::re_types_core::Loggable for FillMode { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -124,7 +125,7 @@ impl ::re_types_core::Loggable for FillMode { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -140,12 +141,13 @@ impl ::re_types_core::Loggable for FillMode { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +160,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::arrow2_datatype(), + Self::arrow_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 17cd8e5288af..d8863dc39964 100644 --- a/crates/store/re_types/src/components/fill_ratio.rs +++ b/crates/store/re_types/src/components/fill_ratio.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for FillRatio { impl ::re_types_core::Loggable for FillRatio { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/gamma_correction.rs b/crates/store/re_types/src/components/gamma_correction.rs index fba16194be57..75c2cd3bedda 100644 --- a/crates/store/re_types/src/components/gamma_correction.rs +++ b/crates/store/re_types/src/components/gamma_correction.rs @@ -74,8 +74,8 @@ impl std::ops::DerefMut for GammaCorrection { impl ::re_types_core::Loggable for GammaCorrection { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( 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 099c56e676c0..ca171c2adcdb 100644 --- a/crates/store/re_types/src/components/geo_line_string.rs +++ b/crates/store/re_types/src/components/geo_line_string.rs @@ -45,12 +45,12 @@ impl, T: IntoIterator> From for G impl ::re_types_core::Loggable for GeoLineString { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for GeoLineString { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -102,10 +103,11 @@ impl ::re_types_core::Loggable for GeoLineString { FixedSizeListArray::new( DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float64, false)), - 2usize, - ), + 2, + ) + .into(), PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), data0_inner_data_inner_data.into_iter().collect(), data0_inner_data_inner_bitmap, ) @@ -129,13 +131,14 @@ impl ::re_types_core::Loggable for GeoLineString { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -156,7 +159,7 @@ impl ::re_types_core::Loggable for GeoLineString { DataType::Float64, false, )), - 2usize, + 2, ); let actual = arrow_data_inner.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 5174b31f1d51..183c4a2cc54c 100644 --- a/crates/store/re_types/src/components/half_size2d.rs +++ b/crates/store/re_types/src/components/half_size2d.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for HalfSize2D { impl ::re_types_core::Loggable for HalfSize2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec2D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/half_size3d.rs b/crates/store/re_types/src/components/half_size3d.rs index a79e25b2abec..fb4c6917e9de 100644 --- a/crates/store/re_types/src/components/half_size3d.rs +++ b/crates/store/re_types/src/components/half_size3d.rs @@ -73,8 +73,8 @@ impl std::ops::DerefMut for HalfSize3D { impl ::re_types_core::Loggable for HalfSize3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/image_buffer.rs b/crates/store/re_types/src/components/image_buffer.rs index 468349ebea37..e9a643de855d 100644 --- a/crates/store/re_types/src/components/image_buffer.rs +++ b/crates/store/re_types/src/components/image_buffer.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for ImageBuffer { impl ::re_types_core::Loggable for ImageBuffer { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Blob::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Blob::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/image_format.rs b/crates/store/re_types/src/components/image_format.rs index 6912608adb46..d816d249afe1 100644 --- a/crates/store/re_types/src/components/image_format.rs +++ b/crates/store/re_types/src/components/image_format.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for ImageFormat { impl ::re_types_core::Loggable for ImageFormat { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ImageFormat::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::ImageFormat::arrow_datatype() } fn to_arrow2_opt<'a>( 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 b300ff36163c..5e297e9b198b 100644 --- a/crates/store/re_types/src/components/image_plane_distance.rs +++ b/crates/store/re_types/src/components/image_plane_distance.rs @@ -69,8 +69,8 @@ impl std::ops::DerefMut for ImagePlaneDistance { impl ::re_types_core::Loggable for ImagePlaneDistance { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/keypoint_id.rs b/crates/store/re_types/src/components/keypoint_id.rs index 17f68de0e5e3..bdb8aae1063b 100644 --- a/crates/store/re_types/src/components/keypoint_id.rs +++ b/crates/store/re_types/src/components/keypoint_id.rs @@ -85,8 +85,8 @@ impl std::ops::DerefMut for KeypointId { impl ::re_types_core::Loggable for KeypointId { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::KeypointId::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::KeypointId::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/lat_lon.rs b/crates/store/re_types/src/components/lat_lon.rs index d234e2596029..3350cfbaa9fc 100644 --- a/crates/store/re_types/src/components/lat_lon.rs +++ b/crates/store/re_types/src/components/lat_lon.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for LatLon { impl ::re_types_core::Loggable for LatLon { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::DVec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::DVec2D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/length.rs b/crates/store/re_types/src/components/length.rs index c9af57f4259d..a576a8827fd9 100644 --- a/crates/store/re_types/src/components/length.rs +++ b/crates/store/re_types/src/components/length.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for Length { impl ::re_types_core::Loggable for Length { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/line_strip2d.rs b/crates/store/re_types/src/components/line_strip2d.rs index fca9aa19e202..e4cc494c81e2 100644 --- a/crates/store/re_types/src/components/line_strip2d.rs +++ b/crates/store/re_types/src/components/line_strip2d.rs @@ -55,12 +55,12 @@ impl, T: IntoIterator> From for Li impl ::re_types_core::Loggable for LineStrip2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for LineStrip2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -99,7 +100,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -112,10 +113,11 @@ impl ::re_types_core::Loggable for LineStrip2D { FixedSizeListArray::new( DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 2usize, - ), + 2, + ) + .into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data_inner_data.into_iter().collect(), data0_inner_data_inner_bitmap, ) @@ -139,13 +141,14 @@ impl ::re_types_core::Loggable for LineStrip2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -166,7 +169,7 @@ impl ::re_types_core::Loggable for LineStrip2D { DataType::Float32, false, )), - 2usize, + 2, ); let actual = arrow_data_inner.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 6283a6309953..241ab65e8130 100644 --- a/crates/store/re_types/src/components/line_strip3d.rs +++ b/crates/store/re_types/src/components/line_strip3d.rs @@ -55,12 +55,12 @@ impl, T: IntoIterator> From for Li impl ::re_types_core::Loggable for LineStrip3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for LineStrip3D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -99,7 +100,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; @@ -112,10 +113,11 @@ impl ::re_types_core::Loggable for LineStrip3D { FixedSizeListArray::new( DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, - ), + 3, + ) + .into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data_inner_data.into_iter().collect(), data0_inner_data_inner_bitmap, ) @@ -139,13 +141,14 @@ impl ::re_types_core::Loggable for LineStrip3D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -166,7 +169,7 @@ impl ::re_types_core::Loggable for LineStrip3D { DataType::Float32, false, )), - 3usize, + 3, ); let actual = arrow_data_inner.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 a88bec0ed014..b1bd2c038cc7 100644 --- a/crates/store/re_types/src/components/magnification_filter.rs +++ b/crates/store/re_types/src/components/magnification_filter.rs @@ -80,9 +80,9 @@ impl std::fmt::Display for MagnificationFilter { impl ::re_types_core::Loggable for MagnificationFilter { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -95,7 +95,8 @@ impl ::re_types_core::Loggable for MagnificationFilter { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -110,7 +111,7 @@ impl ::re_types_core::Loggable for MagnificationFilter { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -126,12 +127,13 @@ impl ::re_types_core::Loggable for MagnificationFilter { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -143,7 +145,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::arrow2_datatype(), + Self::arrow_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 36fd014c26f1..388ee5ad5e94 100644 --- a/crates/store/re_types/src/components/marker_shape.rs +++ b/crates/store/re_types/src/components/marker_shape.rs @@ -122,9 +122,9 @@ impl std::fmt::Display for MarkerShape { impl ::re_types_core::Loggable for MarkerShape { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -137,7 +137,8 @@ impl ::re_types_core::Loggable for MarkerShape { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -152,7 +153,7 @@ impl ::re_types_core::Loggable for MarkerShape { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -168,12 +169,13 @@ impl ::re_types_core::Loggable for MarkerShape { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -193,7 +195,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::arrow2_datatype(), + Self::arrow_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 4f44ca66050d..e1927f83ddee 100644 --- a/crates/store/re_types/src/components/marker_size.rs +++ b/crates/store/re_types/src/components/marker_size.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for MarkerSize { impl ::re_types_core::Loggable for MarkerSize { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/media_type.rs b/crates/store/re_types/src/components/media_type.rs index fe334105bb42..cf29f6909bd4 100644 --- a/crates/store/re_types/src/components/media_type.rs +++ b/crates/store/re_types/src/components/media_type.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for MediaType { impl ::re_types_core::Loggable for MediaType { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/name.rs b/crates/store/re_types/src/components/name.rs index 895caa97e92e..94e94354b0cf 100644 --- a/crates/store/re_types/src/components/name.rs +++ b/crates/store/re_types/src/components/name.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Name { impl ::re_types_core::Loggable for Name { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/opacity.rs b/crates/store/re_types/src/components/opacity.rs index da095c126a63..146e6cf15654 100644 --- a/crates/store/re_types/src/components/opacity.rs +++ b/crates/store/re_types/src/components/opacity.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for Opacity { impl ::re_types_core::Loggable for Opacity { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/pinhole_projection.rs b/crates/store/re_types/src/components/pinhole_projection.rs index 49fd3921eb6e..355e268fc373 100644 --- a/crates/store/re_types/src/components/pinhole_projection.rs +++ b/crates/store/re_types/src/components/pinhole_projection.rs @@ -77,8 +77,8 @@ impl std::ops::DerefMut for PinholeProjection { impl ::re_types_core::Loggable for PinholeProjection { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Mat3x3::arrow_datatype() } fn to_arrow2_opt<'a>( 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 69f3c19db727..d41ea1b0a22c 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,8 +68,8 @@ impl std::ops::DerefMut for PoseRotationAxisAngle { impl ::re_types_core::Loggable for PoseRotationAxisAngle { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::RotationAxisAngle::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::RotationAxisAngle::arrow_datatype() } fn to_arrow2_opt<'a>( 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 73309d4222df..05541e505641 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for PoseRotationQuat { impl ::re_types_core::Loggable for PoseRotationQuat { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Quaternion::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Quaternion::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/pose_scale3d.rs b/crates/store/re_types/src/components/pose_scale3d.rs index dc8405122019..b4378b6c23b4 100644 --- a/crates/store/re_types/src/components/pose_scale3d.rs +++ b/crates/store/re_types/src/components/pose_scale3d.rs @@ -72,8 +72,8 @@ impl std::ops::DerefMut for PoseScale3D { impl ::re_types_core::Loggable for PoseScale3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( 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 3b13194ee2de..4ddcd78a1b71 100644 --- a/crates/store/re_types/src/components/pose_transform_mat3x3.rs +++ b/crates/store/re_types/src/components/pose_transform_mat3x3.rs @@ -80,8 +80,8 @@ impl std::ops::DerefMut for PoseTransformMat3x3 { impl ::re_types_core::Loggable for PoseTransformMat3x3 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Mat3x3::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/pose_translation3d.rs b/crates/store/re_types/src/components/pose_translation3d.rs index 58f01f022402..a4d4e6424676 100644 --- a/crates/store/re_types/src/components/pose_translation3d.rs +++ b/crates/store/re_types/src/components/pose_translation3d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for PoseTranslation3D { impl ::re_types_core::Loggable for PoseTranslation3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/position2d.rs b/crates/store/re_types/src/components/position2d.rs index 5247e7207ba6..145668f91d1f 100644 --- a/crates/store/re_types/src/components/position2d.rs +++ b/crates/store/re_types/src/components/position2d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Position2D { impl ::re_types_core::Loggable for Position2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec2D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/position3d.rs b/crates/store/re_types/src/components/position3d.rs index 5d464f2c5390..dc03a9b250f6 100644 --- a/crates/store/re_types/src/components/position3d.rs +++ b/crates/store/re_types/src/components/position3d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Position3D { impl ::re_types_core::Loggable for Position3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/radius.rs b/crates/store/re_types/src/components/radius.rs index ef66a5d7a738..15bd75ee62c6 100644 --- a/crates/store/re_types/src/components/radius.rs +++ b/crates/store/re_types/src/components/radius.rs @@ -75,8 +75,8 @@ impl std::ops::DerefMut for Radius { impl ::re_types_core::Loggable for Radius { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/range1d.rs b/crates/store/re_types/src/components/range1d.rs index c432aca259d5..90404d0457cf 100644 --- a/crates/store/re_types/src/components/range1d.rs +++ b/crates/store/re_types/src/components/range1d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Range1D { impl ::re_types_core::Loggable for Range1D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range1D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Range1D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/resolution.rs b/crates/store/re_types/src/components/resolution.rs index d15c3abb2870..a5395a62b4e7 100644 --- a/crates/store/re_types/src/components/resolution.rs +++ b/crates/store/re_types/src/components/resolution.rs @@ -69,8 +69,8 @@ impl std::ops::DerefMut for Resolution { impl ::re_types_core::Loggable for Resolution { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec2D::arrow_datatype() } fn to_arrow2_opt<'a>( 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 4ffdaf289296..be681335c48b 100644 --- a/crates/store/re_types/src/components/rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/rotation_axis_angle.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for RotationAxisAngle { impl ::re_types_core::Loggable for RotationAxisAngle { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::RotationAxisAngle::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::RotationAxisAngle::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/rotation_quat.rs b/crates/store/re_types/src/components/rotation_quat.rs index b9ab1eb45fb5..ff8ded9db655 100644 --- a/crates/store/re_types/src/components/rotation_quat.rs +++ b/crates/store/re_types/src/components/rotation_quat.rs @@ -71,8 +71,8 @@ impl std::ops::DerefMut for RotationQuat { impl ::re_types_core::Loggable for RotationQuat { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Quaternion::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Quaternion::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/scalar.rs b/crates/store/re_types/src/components/scalar.rs index 724559d4ef71..9521649b7603 100644 --- a/crates/store/re_types/src/components/scalar.rs +++ b/crates/store/re_types/src/components/scalar.rs @@ -70,8 +70,8 @@ impl std::ops::DerefMut for Scalar { impl ::re_types_core::Loggable for Scalar { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float64::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float64::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/scale3d.rs b/crates/store/re_types/src/components/scale3d.rs index 46c4b978b04a..33beb6bd70c9 100644 --- a/crates/store/re_types/src/components/scale3d.rs +++ b/crates/store/re_types/src/components/scale3d.rs @@ -72,8 +72,8 @@ impl std::ops::DerefMut for Scale3D { impl ::re_types_core::Loggable for Scale3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/show_labels.rs b/crates/store/re_types/src/components/show_labels.rs index dd5dde88f2c8..9c72df4a18bb 100644 --- a/crates/store/re_types/src/components/show_labels.rs +++ b/crates/store/re_types/src/components/show_labels.rs @@ -74,8 +74,8 @@ impl std::ops::DerefMut for ShowLabels { impl ::re_types_core::Loggable for ShowLabels { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/stroke_width.rs b/crates/store/re_types/src/components/stroke_width.rs index d616f092ef56..ae14c912af90 100644 --- a/crates/store/re_types/src/components/stroke_width.rs +++ b/crates/store/re_types/src/components/stroke_width.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for StrokeWidth { impl ::re_types_core::Loggable for StrokeWidth { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Float32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Float32::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/tensor_data.rs b/crates/store/re_types/src/components/tensor_data.rs index 0f9ab55b2abd..5bc6b96067ea 100644 --- a/crates/store/re_types/src/components/tensor_data.rs +++ b/crates/store/re_types/src/components/tensor_data.rs @@ -75,8 +75,8 @@ impl std::ops::DerefMut for TensorData { impl ::re_types_core::Loggable for TensorData { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorData::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::TensorData::arrow_datatype() } fn to_arrow2_opt<'a>( 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 ee019e51cd2d..405b26b96193 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,8 +72,8 @@ impl std::ops::DerefMut for TensorDimensionIndexSelection { impl ::re_types_core::Loggable for TensorDimensionIndexSelection { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionIndexSelection::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::TensorDimensionIndexSelection::arrow_datatype() } fn to_arrow2_opt<'a>( 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 d60c7a6717a9..26f053539042 100644 --- a/crates/store/re_types/src/components/tensor_height_dimension.rs +++ b/crates/store/re_types/src/components/tensor_height_dimension.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for TensorHeightDimension { impl ::re_types_core::Loggable for TensorHeightDimension { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionSelection::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::TensorDimensionSelection::arrow_datatype() } fn to_arrow2_opt<'a>( 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 e54f7fefb461..6877c4b1474d 100644 --- a/crates/store/re_types/src/components/tensor_width_dimension.rs +++ b/crates/store/re_types/src/components/tensor_width_dimension.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for TensorWidthDimension { impl ::re_types_core::Loggable for TensorWidthDimension { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::TensorDimensionSelection::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::TensorDimensionSelection::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/texcoord2d.rs b/crates/store/re_types/src/components/texcoord2d.rs index 0f38f062775e..c9c5a724232f 100644 --- a/crates/store/re_types/src/components/texcoord2d.rs +++ b/crates/store/re_types/src/components/texcoord2d.rs @@ -83,8 +83,8 @@ impl std::ops::DerefMut for Texcoord2D { impl ::re_types_core::Loggable for Texcoord2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec2D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/text.rs b/crates/store/re_types/src/components/text.rs index 7fcf661cb70e..5d5afa486884 100644 --- a/crates/store/re_types/src/components/text.rs +++ b/crates/store/re_types/src/components/text.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Text { impl ::re_types_core::Loggable for Text { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( 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 01613712b317..a64239622976 100644 --- a/crates/store/re_types/src/components/text_log_level.rs +++ b/crates/store/re_types/src/components/text_log_level.rs @@ -76,8 +76,8 @@ impl std::ops::DerefMut for TextLogLevel { impl ::re_types_core::Loggable for TextLogLevel { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Utf8::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Utf8::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/transform_mat3x3.rs b/crates/store/re_types/src/components/transform_mat3x3.rs index fe4f2c19e69f..8b9f349d1f2b 100644 --- a/crates/store/re_types/src/components/transform_mat3x3.rs +++ b/crates/store/re_types/src/components/transform_mat3x3.rs @@ -80,8 +80,8 @@ impl std::ops::DerefMut for TransformMat3x3 { impl ::re_types_core::Loggable for TransformMat3x3 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Mat3x3::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Mat3x3::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/transform_relation.rs b/crates/store/re_types/src/components/transform_relation.rs index 99085cd29840..0acb7a41088b 100644 --- a/crates/store/re_types/src/components/transform_relation.rs +++ b/crates/store/re_types/src/components/transform_relation.rs @@ -83,9 +83,9 @@ impl std::fmt::Display for TransformRelation { impl ::re_types_core::Loggable for TransformRelation { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -98,7 +98,8 @@ impl ::re_types_core::Loggable for TransformRelation { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -113,7 +114,7 @@ impl ::re_types_core::Loggable for TransformRelation { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -129,12 +130,13 @@ impl ::re_types_core::Loggable for TransformRelation { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +148,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::arrow2_datatype(), + Self::arrow_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/components/translation3d.rs b/crates/store/re_types/src/components/translation3d.rs index 42f7433fc57f..f3b0ea611f9c 100644 --- a/crates/store/re_types/src/components/translation3d.rs +++ b/crates/store/re_types/src/components/translation3d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Translation3D { impl ::re_types_core::Loggable for Translation3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/triangle_indices.rs b/crates/store/re_types/src/components/triangle_indices.rs index 555f5a0dfa12..7253c0499b19 100644 --- a/crates/store/re_types/src/components/triangle_indices.rs +++ b/crates/store/re_types/src/components/triangle_indices.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for TriangleIndices { impl ::re_types_core::Loggable for TriangleIndices { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UVec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::UVec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/value_range.rs b/crates/store/re_types/src/components/value_range.rs index af5633290b85..4fdaa772d331 100644 --- a/crates/store/re_types/src/components/value_range.rs +++ b/crates/store/re_types/src/components/value_range.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for ValueRange { impl ::re_types_core::Loggable for ValueRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Range1D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Range1D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/vector2d.rs b/crates/store/re_types/src/components/vector2d.rs index ab040b8a63cd..8500bd3aabc8 100644 --- a/crates/store/re_types/src/components/vector2d.rs +++ b/crates/store/re_types/src/components/vector2d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Vector2D { impl ::re_types_core::Loggable for Vector2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec2D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec2D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/vector3d.rs b/crates/store/re_types/src/components/vector3d.rs index a022b365d7af..795985b9fb80 100644 --- a/crates/store/re_types/src/components/vector3d.rs +++ b/crates/store/re_types/src/components/vector3d.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for Vector3D { impl ::re_types_core::Loggable for Vector3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Vec3D::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Vec3D::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/video_timestamp.rs b/crates/store/re_types/src/components/video_timestamp.rs index 54a223baae48..b9a75cb1023e 100644 --- a/crates/store/re_types/src/components/video_timestamp.rs +++ b/crates/store/re_types/src/components/video_timestamp.rs @@ -68,8 +68,8 @@ impl std::ops::DerefMut for VideoTimestamp { impl ::re_types_core::Loggable for VideoTimestamp { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::VideoTimestamp::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::VideoTimestamp::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/components/view_coordinates.rs b/crates/store/re_types/src/components/view_coordinates.rs index 42277e51927c..ae377dfa1fa1 100644 --- a/crates/store/re_types/src/components/view_coordinates.rs +++ b/crates/store/re_types/src/components/view_coordinates.rs @@ -88,8 +88,8 @@ impl std::ops::DerefMut for ViewCoordinates { impl ::re_types_core::Loggable for ViewCoordinates { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::ViewCoordinates::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::ViewCoordinates::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types/src/datatypes/angle.rs b/crates/store/re_types/src/datatypes/angle.rs index 5aaee33ee6a2..e00e35c0a074 100644 --- a/crates/store/re_types/src/datatypes/angle.rs +++ b/crates/store/re_types/src/datatypes/angle.rs @@ -56,9 +56,9 @@ impl From for f32 { impl ::re_types_core::Loggable for Angle { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Float32 } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Angle { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, radians): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +87,7 @@ impl ::re_types_core::Loggable for Angle { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), radians.into_iter().map(|v| v.unwrap_or_default()).collect(), radians_bitmap, ) @@ -102,12 +103,13 @@ impl ::re_types_core::Loggable for Angle { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -128,7 +130,8 @@ impl ::re_types_core::Loggable for Angle { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types/src/datatypes/annotation_info.rs b/crates/store/re_types/src/datatypes/annotation_info.rs index c22fcd8e61cd..3fbe50c49993 100644 --- a/crates/store/re_types/src/datatypes/annotation_info.rs +++ b/crates/store/re_types/src/datatypes/annotation_info.rs @@ -52,13 +52,13 @@ impl ::re_types_core::SizeBytes for AnnotationInfo { impl ::re_types_core::Loggable for AnnotationInfo { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("id", DataType::UInt16, false), - Field::new("label", ::arrow2_datatype(), true), - Field::new("color", ::arrow2_datatype(), true), + Field::new("label", ::arrow_datatype(), true), + Field::new("color", ::arrow_datatype(), true), ])) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for AnnotationInfo { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -85,7 +86,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, id): (Vec<_>, Vec<_>) = data @@ -100,7 +101,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt16, + DataType::UInt16.into(), id.into_iter().map(|v| v.unwrap_or_default()).collect(), id_bitmap, ) @@ -135,7 +136,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, label_bitmap, @@ -158,7 +159,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), color .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -182,13 +183,14 @@ impl ::re_types_core::Loggable for AnnotationInfo { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -206,7 +208,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let id = { if !arrays_by_name.contains_key("id") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "id", )) .with_context("rerun.datatypes.AnnotationInfo"); @@ -227,7 +229,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let label = { if !arrays_by_name.contains_key("label") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "label", )) .with_context("rerun.datatypes.AnnotationInfo"); @@ -282,7 +284,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { let color = { if !arrays_by_name.contains_key("color") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 a096e9659f13..6501ddfe5194 100644 --- a/crates/store/re_types/src/datatypes/blob.rs +++ b/crates/store/re_types/src/datatypes/blob.rs @@ -55,9 +55,9 @@ impl From for ::re_types_core::ArrowBuffer { impl ::re_types_core::Loggable for Blob { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", DataType::UInt8, @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for Blob { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -105,10 +106,14 @@ impl ::re_types_core::Loggable for Blob { .into(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, - PrimitiveArray::new(DataType::UInt8, data0_inner_data, data0_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::UInt8.into(), + data0_inner_data, + data0_inner_bitmap, + ) + .boxed(), data0_bitmap, )? .boxed() @@ -124,13 +129,14 @@ impl ::re_types_core::Loggable for Blob { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 1e954f350fb0..204d22bf0c2b 100644 --- a/crates/store/re_types/src/datatypes/channel_datatype.rs +++ b/crates/store/re_types/src/datatypes/channel_datatype.rs @@ -130,9 +130,9 @@ impl std::fmt::Display for ChannelDatatype { impl ::re_types_core::Loggable for ChannelDatatype { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -145,7 +145,8 @@ impl ::re_types_core::Loggable for ChannelDatatype { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -160,7 +161,7 @@ impl ::re_types_core::Loggable for ChannelDatatype { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -176,12 +177,13 @@ impl ::re_types_core::Loggable for ChannelDatatype { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,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::arrow2_datatype(), + Self::arrow_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 cef0d66baec4..dfbdf480eccd 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 arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "info", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "keypoint_annotations", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_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", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))), false, @@ -103,7 +103,8 @@ impl ::re_types_core::Loggable for ClassDescription { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -117,7 +118,7 @@ impl ::re_types_core::Loggable for ClassDescription { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, info): (Vec<_>, Vec<_>) = data @@ -168,9 +169,10 @@ impl ::re_types_core::Loggable for ClassDescription { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, - ))), + ))) + .into(), offsets, { _ = keypoint_annotations_inner_bitmap; @@ -215,9 +217,10 @@ impl ::re_types_core::Loggable for ClassDescription { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, - ))), + ))) + .into(), offsets, { _ = keypoint_connections_inner_bitmap; @@ -245,13 +248,14 @@ impl ::re_types_core::Loggable for ClassDescription { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -269,7 +273,7 @@ impl ::re_types_core::Loggable for ClassDescription { let info = { if !arrays_by_name.contains_key("info") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "info", )) .with_context("rerun.datatypes.ClassDescription"); @@ -282,7 +286,7 @@ impl ::re_types_core::Loggable for ClassDescription { let keypoint_annotations = { if !arrays_by_name.contains_key("keypoint_annotations") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "keypoint_annotations", )) .with_context("rerun.datatypes.ClassDescription"); @@ -295,7 +299,7 @@ impl ::re_types_core::Loggable for ClassDescription { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -352,7 +356,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::arrow2_datatype(), + Self::arrow_datatype(), "keypoint_connections", )) .with_context("rerun.datatypes.ClassDescription"); @@ -365,7 +369,7 @@ impl ::re_types_core::Loggable for ClassDescription { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); 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 cbef4b8addb8..6edbc87efc3d 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,18 +46,18 @@ impl ::re_types_core::SizeBytes for ClassDescriptionMapElem { impl ::re_types_core::Loggable for ClassDescriptionMapElem { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "class_id", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "class_description", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -72,7 +72,8 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +87,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, class_id): (Vec<_>, Vec<_>) = data @@ -101,7 +102,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt16, + DataType::UInt16.into(), class_id .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -143,13 +144,14 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -167,7 +169,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::arrow2_datatype(), + Self::arrow_datatype(), "class_id", )) .with_context("rerun.datatypes.ClassDescriptionMapElem"); @@ -189,7 +191,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype(), "class_description", )) .with_context("rerun.datatypes.ClassDescriptionMapElem"); diff --git a/crates/store/re_types/src/datatypes/class_id.rs b/crates/store/re_types/src/datatypes/class_id.rs index 94439d6a92de..cfaec84e2b23 100644 --- a/crates/store/re_types/src/datatypes/class_id.rs +++ b/crates/store/re_types/src/datatypes/class_id.rs @@ -68,9 +68,9 @@ impl From for u16 { impl ::re_types_core::Loggable for ClassId { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt16 } @@ -83,7 +83,8 @@ impl ::re_types_core::Loggable for ClassId { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -98,7 +99,7 @@ impl ::re_types_core::Loggable for ClassId { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -114,12 +115,13 @@ impl ::re_types_core::Loggable for ClassId { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -140,7 +142,8 @@ impl ::re_types_core::Loggable for ClassId { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types/src/datatypes/color_model.rs b/crates/store/re_types/src/datatypes/color_model.rs index 108d7b94c158..17595e694f15 100644 --- a/crates/store/re_types/src/datatypes/color_model.rs +++ b/crates/store/re_types/src/datatypes/color_model.rs @@ -92,9 +92,9 @@ impl std::fmt::Display for ColorModel { impl ::re_types_core::Loggable for ColorModel { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -107,7 +107,8 @@ impl ::re_types_core::Loggable for ColorModel { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -122,7 +123,7 @@ impl ::re_types_core::Loggable for ColorModel { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -138,12 +139,13 @@ impl ::re_types_core::Loggable for ColorModel { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +160,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::arrow2_datatype(), + Self::arrow_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/datatypes/dvec2d.rs b/crates/store/re_types/src/datatypes/dvec2d.rs index e71b04b8c598..1001799afe77 100644 --- a/crates/store/re_types/src/datatypes/dvec2d.rs +++ b/crates/store/re_types/src/datatypes/dvec2d.rs @@ -53,12 +53,12 @@ impl From for [f64; 2usize] { impl ::re_types_core::Loggable for DVec2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float64, false)), - 2usize, + 2, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for DVec2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for DVec2D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for DVec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for DVec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for DVec2D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float64, false)), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/image_format.rs b/crates/store/re_types/src/datatypes/image_format.rs index c0e797e81234..f28ef43b48b7 100644 --- a/crates/store/re_types/src/datatypes/image_format.rs +++ b/crates/store/re_types/src/datatypes/image_format.rs @@ -67,25 +67,25 @@ impl ::re_types_core::SizeBytes for ImageFormat { impl ::re_types_core::Loggable for ImageFormat { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("width", DataType::UInt32, false), Field::new("height", DataType::UInt32, false), Field::new( "pixel_format", - ::arrow2_datatype(), + ::arrow_datatype(), true, ), Field::new( "color_model", - ::arrow2_datatype(), + ::arrow_datatype(), true, ), Field::new( "channel_datatype", - ::arrow2_datatype(), + ::arrow_datatype(), true, ), ])) @@ -100,7 +100,8 @@ impl ::re_types_core::Loggable for ImageFormat { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -114,7 +115,7 @@ impl ::re_types_core::Loggable for ImageFormat { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, width): (Vec<_>, Vec<_>) = data @@ -129,7 +130,7 @@ impl ::re_types_core::Loggable for ImageFormat { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), width.into_iter().map(|v| v.unwrap_or_default()).collect(), width_bitmap, ) @@ -148,7 +149,7 @@ impl ::re_types_core::Loggable for ImageFormat { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), height.into_iter().map(|v| v.unwrap_or_default()).collect(), height_bitmap, ) @@ -229,13 +230,14 @@ impl ::re_types_core::Loggable for ImageFormat { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -253,7 +255,7 @@ impl ::re_types_core::Loggable for ImageFormat { let width = { if !arrays_by_name.contains_key("width") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "width", )) .with_context("rerun.datatypes.ImageFormat"); @@ -274,7 +276,7 @@ impl ::re_types_core::Loggable for ImageFormat { let height = { if !arrays_by_name.contains_key("height") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "height", )) .with_context("rerun.datatypes.ImageFormat"); @@ -295,7 +297,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype(), "pixel_format", )) .with_context("rerun.datatypes.ImageFormat"); @@ -308,7 +310,7 @@ impl ::re_types_core::Loggable for ImageFormat { let color_model = { if !arrays_by_name.contains_key("color_model") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "color_model", )) .with_context("rerun.datatypes.ImageFormat"); @@ -321,7 +323,7 @@ impl ::re_types_core::Loggable for ImageFormat { let channel_datatype = { if !arrays_by_name.contains_key("channel_datatype") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "channel_datatype", )) .with_context("rerun.datatypes.ImageFormat"); diff --git a/crates/store/re_types/src/datatypes/keypoint_id.rs b/crates/store/re_types/src/datatypes/keypoint_id.rs index aad03ec46a9d..363f740ceb49 100644 --- a/crates/store/re_types/src/datatypes/keypoint_id.rs +++ b/crates/store/re_types/src/datatypes/keypoint_id.rs @@ -70,9 +70,9 @@ impl From for u16 { impl ::re_types_core::Loggable for KeypointId { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt16 } @@ -85,7 +85,8 @@ impl ::re_types_core::Loggable for KeypointId { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -100,7 +101,7 @@ impl ::re_types_core::Loggable for KeypointId { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -116,12 +117,13 @@ impl ::re_types_core::Loggable for KeypointId { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -142,7 +144,8 @@ impl ::re_types_core::Loggable for KeypointId { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types/src/datatypes/keypoint_pair.rs b/crates/store/re_types/src/datatypes/keypoint_pair.rs index 3804c96c2a8e..0eb42c747454 100644 --- a/crates/store/re_types/src/datatypes/keypoint_pair.rs +++ b/crates/store/re_types/src/datatypes/keypoint_pair.rs @@ -44,18 +44,18 @@ impl ::re_types_core::SizeBytes for KeypointPair { impl ::re_types_core::Loggable for KeypointPair { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "keypoint0", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "keypoint1", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -70,7 +70,8 @@ impl ::re_types_core::Loggable for KeypointPair { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +85,7 @@ impl ::re_types_core::Loggable for KeypointPair { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, keypoint0): (Vec<_>, Vec<_>) = data @@ -99,7 +100,7 @@ impl ::re_types_core::Loggable for KeypointPair { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt16, + DataType::UInt16.into(), keypoint0 .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -121,7 +122,7 @@ impl ::re_types_core::Loggable for KeypointPair { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt16, + DataType::UInt16.into(), keypoint1 .into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) @@ -145,13 +146,14 @@ impl ::re_types_core::Loggable for KeypointPair { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -169,7 +171,7 @@ impl ::re_types_core::Loggable for KeypointPair { let keypoint0 = { if !arrays_by_name.contains_key("keypoint0") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "keypoint0", )) .with_context("rerun.datatypes.KeypointPair"); @@ -191,7 +193,7 @@ impl ::re_types_core::Loggable for KeypointPair { let keypoint1 = { if !arrays_by_name.contains_key("keypoint1") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 a3d1fb634979..303f14de9774 100644 --- a/crates/store/re_types/src/datatypes/mat3x3.rs +++ b/crates/store/re_types/src/datatypes/mat3x3.rs @@ -65,12 +65,12 @@ impl From for [f32; 9usize] { impl ::re_types_core::Loggable for Mat3x3 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 9usize, + 9, ) } @@ -83,7 +83,8 @@ impl ::re_types_core::Loggable for Mat3x3 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -118,9 +119,9 @@ impl ::re_types_core::Loggable for Mat3x3 { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -140,13 +141,14 @@ impl ::re_types_core::Loggable for Mat3x3 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -214,7 +216,8 @@ impl ::re_types_core::Loggable for Mat3x3 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -228,7 +231,7 @@ impl ::re_types_core::Loggable for Mat3x3 { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 9usize, + 9, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/mat4x4.rs b/crates/store/re_types/src/datatypes/mat4x4.rs index 350ce32fe103..4a9b9081fae3 100644 --- a/crates/store/re_types/src/datatypes/mat4x4.rs +++ b/crates/store/re_types/src/datatypes/mat4x4.rs @@ -65,12 +65,12 @@ impl From for [f32; 16usize] { impl ::re_types_core::Loggable for Mat4x4 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 16usize, + 16, ) } @@ -83,7 +83,8 @@ impl ::re_types_core::Loggable for Mat4x4 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -118,9 +119,9 @@ impl ::re_types_core::Loggable for Mat4x4 { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -140,13 +141,14 @@ impl ::re_types_core::Loggable for Mat4x4 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -214,7 +216,8 @@ impl ::re_types_core::Loggable for Mat4x4 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -228,7 +231,7 @@ impl ::re_types_core::Loggable for Mat4x4 { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 16usize, + 16, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/pixel_format.rs b/crates/store/re_types/src/datatypes/pixel_format.rs index c79a03bd7bb1..13c80f4c84f3 100644 --- a/crates/store/re_types/src/datatypes/pixel_format.rs +++ b/crates/store/re_types/src/datatypes/pixel_format.rs @@ -212,9 +212,9 @@ impl std::fmt::Display for PixelFormat { impl ::re_types_core::Loggable for PixelFormat { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -227,7 +227,8 @@ impl ::re_types_core::Loggable for PixelFormat { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -242,7 +243,7 @@ impl ::re_types_core::Loggable for PixelFormat { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -258,12 +259,13 @@ impl ::re_types_core::Loggable for PixelFormat { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -283,7 +285,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::arrow2_datatype(), + Self::arrow_datatype(), "", invalid as _, )), diff --git a/crates/store/re_types/src/datatypes/quaternion.rs b/crates/store/re_types/src/datatypes/quaternion.rs index 11fee5d0a2f4..b45e589dc61c 100644 --- a/crates/store/re_types/src/datatypes/quaternion.rs +++ b/crates/store/re_types/src/datatypes/quaternion.rs @@ -56,12 +56,12 @@ impl From for [f32; 4usize] { impl ::re_types_core::Loggable for Quaternion { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 4usize, + 4, ) } @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for Quaternion { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -109,9 +110,9 @@ impl ::re_types_core::Loggable for Quaternion { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -131,13 +132,14 @@ impl ::re_types_core::Loggable for Quaternion { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -205,7 +207,8 @@ impl ::re_types_core::Loggable for Quaternion { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -219,7 +222,7 @@ impl ::re_types_core::Loggable for Quaternion { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 4usize, + 4, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/range1d.rs b/crates/store/re_types/src/datatypes/range1d.rs index 8fbeaccbbea8..24fc4122531c 100644 --- a/crates/store/re_types/src/datatypes/range1d.rs +++ b/crates/store/re_types/src/datatypes/range1d.rs @@ -53,12 +53,12 @@ impl From for [f64; 2usize] { impl ::re_types_core::Loggable for Range1D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float64, false)), - 2usize, + 2, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Range1D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for Range1D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for Range1D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for Range1D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for Range1D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float64, false)), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/range2d.rs b/crates/store/re_types/src/datatypes/range2d.rs index 8be89ea107d0..d38ca45ee68f 100644 --- a/crates/store/re_types/src/datatypes/range2d.rs +++ b/crates/store/re_types/src/datatypes/range2d.rs @@ -45,18 +45,18 @@ impl ::re_types_core::SizeBytes for Range2D { impl ::re_types_core::Loggable for Range2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "x_range", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "y_range", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Range2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -85,7 +86,7 @@ impl ::re_types_core::Loggable for Range2D { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, x_range): (Vec<_>, Vec<_>) = data @@ -122,10 +123,11 @@ impl ::re_types_core::Loggable for Range2D { DataType::Float64, false, )), - 2usize, - ), + 2, + ) + .into(), PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), x_range_inner_data.into_iter().collect(), x_range_inner_bitmap, ) @@ -170,10 +172,11 @@ impl ::re_types_core::Loggable for Range2D { DataType::Float64, false, )), - 2usize, - ), + 2, + ) + .into(), PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), y_range_inner_data.into_iter().collect(), y_range_inner_bitmap, ) @@ -198,13 +201,14 @@ impl ::re_types_core::Loggable for Range2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -222,7 +226,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::arrow2_datatype(), + Self::arrow_datatype(), "x_range", )) .with_context("rerun.datatypes.Range2D"); @@ -239,7 +243,7 @@ impl ::re_types_core::Loggable for Range2D { DataType::Float64, false, )), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) @@ -303,7 +307,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::arrow2_datatype(), + Self::arrow_datatype(), "y_range", )) .with_context("rerun.datatypes.Range2D"); @@ -320,7 +324,7 @@ impl ::re_types_core::Loggable for Range2D { DataType::Float64, false, )), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/rgba32.rs b/crates/store/re_types/src/datatypes/rgba32.rs index 52cd92e38f15..3d6862855ddb 100644 --- a/crates/store/re_types/src/datatypes/rgba32.rs +++ b/crates/store/re_types/src/datatypes/rgba32.rs @@ -58,9 +58,9 @@ impl From for u32 { impl ::re_types_core::Loggable for Rgba32 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt32 } @@ -73,7 +73,8 @@ impl ::re_types_core::Loggable for Rgba32 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -88,7 +89,7 @@ impl ::re_types_core::Loggable for Rgba32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -104,12 +105,13 @@ impl ::re_types_core::Loggable for Rgba32 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -130,7 +132,8 @@ impl ::re_types_core::Loggable for Rgba32 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); 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 408bd47cec27..9b74207cd837 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs @@ -48,12 +48,12 @@ impl ::re_types_core::SizeBytes for RotationAxisAngle { impl ::re_types_core::Loggable for RotationAxisAngle { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ - Field::new("axis", ::arrow2_datatype(), false), - Field::new("angle", ::arrow2_datatype(), false), + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ + Field::new("axis", ::arrow_datatype(), false), + Field::new("angle", ::arrow_datatype(), false), ])) } @@ -66,7 +66,8 @@ impl ::re_types_core::Loggable for RotationAxisAngle { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -80,7 +81,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, axis): (Vec<_>, Vec<_>) = data @@ -117,10 +118,11 @@ impl ::re_types_core::Loggable for RotationAxisAngle { DataType::Float32, false, )), - 3usize, - ), + 3, + ) + .into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), axis_inner_data.into_iter().collect(), axis_inner_bitmap, ) @@ -143,7 +145,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), angle .into_iter() .map(|datum| datum.map(|datum| datum.radians).unwrap_or_default()) @@ -167,13 +169,14 @@ impl ::re_types_core::Loggable for RotationAxisAngle { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -191,7 +194,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { let axis = { if !arrays_by_name.contains_key("axis") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "axis", )) .with_context("rerun.datatypes.RotationAxisAngle"); @@ -208,7 +211,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { DataType::Float32, false, )), - 3usize, + 3, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) @@ -271,7 +274,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { let angle = { if !arrays_by_name.contains_key("angle") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 cf18d7717817..7e5055659005 100644 --- a/crates/store/re_types/src/datatypes/tensor_buffer.rs +++ b/crates/store/re_types/src/datatypes/tensor_buffer.rs @@ -96,115 +96,115 @@ impl ::re_types_core::SizeBytes for TensorBuffer { impl ::re_types_core::Loggable for TensorBuffer { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Union( - std::sync::Arc::new(vec![ - Field::new("_null_markers", DataType::Null, true), - Field::new( - "U8", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::UInt8, + UnionFields::new( + vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], + vec![ + Field::new("_null_markers", DataType::Null, true), + Field::new( + "U8", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::UInt8, + false, + ))), false, - ))), - false, - ), - Field::new( - "U16", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::UInt16, + ), + Field::new( + "U16", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::UInt16, + false, + ))), false, - ))), - false, - ), - Field::new( - "U32", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::UInt32, + ), + Field::new( + "U32", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::UInt32, + false, + ))), false, - ))), - false, - ), - Field::new( - "U64", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::UInt64, + ), + Field::new( + "U64", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::UInt64, + false, + ))), false, - ))), - false, - ), - Field::new( - "I8", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Int8, + ), + Field::new( + "I8", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Int8, + false, + ))), false, - ))), - false, - ), - Field::new( - "I16", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Int16, + ), + Field::new( + "I16", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Int16, + false, + ))), false, - ))), - false, - ), - Field::new( - "I32", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Int32, + ), + Field::new( + "I32", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Int32, + false, + ))), false, - ))), - false, - ), - Field::new( - "I64", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Int64, + ), + Field::new( + "I64", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Int64, + false, + ))), false, - ))), - false, - ), - Field::new( - "F16", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Float16, + ), + Field::new( + "F16", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Float16, + false, + ))), false, - ))), - false, - ), - Field::new( - "F32", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Float32, + ), + Field::new( + "F32", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Float32, + false, + ))), false, - ))), - false, - ), - Field::new( - "F64", - DataType::List(std::sync::Arc::new(Field::new( - "item", - DataType::Float64, + ), + Field::new( + "F64", + DataType::List(std::sync::Arc::new(Field::new( + "item", + DataType::Float64, + false, + ))), false, - ))), - false, - ), - ]), - Some(std::sync::Arc::new(vec![ - 0i32, 1i32, 2i32, 3i32, 4i32, 5i32, 6i32, 7i32, 8i32, 9i32, 10i32, 11i32, - ])), + ), + ], + ), UnionMode::Dense, ) } @@ -218,7 +218,8 @@ impl ::re_types_core::Loggable for TensorBuffer { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ // Dense Arrow union let data: Vec<_> = data @@ -246,7 +247,11 @@ impl ::re_types_core::Loggable for TensorBuffer { }) .collect(); let fields = vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()).boxed(), + NullArray::new( + arrow2::datatypes::DataType::Null, + data.iter().filter(|v| v.is_none()).count(), + ) + .boxed(), { let u8: Vec<_> = data .iter() @@ -274,10 +279,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::UInt8, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::UInt8, u8_inner_data, u8_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::UInt8.into(), + u8_inner_data, + u8_inner_bitmap, + ) + .boxed(), u8_bitmap, )? .boxed() @@ -310,10 +320,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::UInt16, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::UInt16, u16_inner_data, u16_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::UInt16.into(), + u16_inner_data, + u16_inner_bitmap, + ) + .boxed(), u16_bitmap, )? .boxed() @@ -346,10 +361,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::UInt32, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::UInt32, u32_inner_data, u32_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::UInt32.into(), + u32_inner_data, + u32_inner_bitmap, + ) + .boxed(), u32_bitmap, )? .boxed() @@ -382,10 +402,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::UInt64, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::UInt64, u64_inner_data, u64_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::UInt64.into(), + u64_inner_data, + u64_inner_bitmap, + ) + .boxed(), u64_bitmap, )? .boxed() @@ -418,10 +443,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Int8, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::Int8, i8_inner_data, i8_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::Int8.into(), + i8_inner_data, + i8_inner_bitmap, + ) + .boxed(), i8_bitmap, )? .boxed() @@ -454,10 +484,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Int16, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::Int16, i16_inner_data, i16_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::Int16.into(), + i16_inner_data, + i16_inner_bitmap, + ) + .boxed(), i16_bitmap, )? .boxed() @@ -490,10 +525,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Int32, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::Int32, i32_inner_data, i32_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::Int32.into(), + i32_inner_data, + i32_inner_bitmap, + ) + .boxed(), i32_bitmap, )? .boxed() @@ -526,10 +566,15 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Int64, false, - ))), + ))) + .into(), offsets, - PrimitiveArray::new(DataType::Int64, i64_inner_data, i64_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::Int64.into(), + i64_inner_data, + i64_inner_bitmap, + ) + .boxed(), i64_bitmap, )? .boxed() @@ -562,10 +607,11 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Float16, false, - ))), + ))) + .into(), offsets, PrimitiveArray::new( - DataType::Float16, + DataType::Float16.into(), f16_inner_data, f16_inner_bitmap, ) @@ -602,10 +648,11 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Float32, false, - ))), + ))) + .into(), offsets, PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), f32_inner_data, f32_inner_bitmap, ) @@ -642,10 +689,11 @@ impl ::re_types_core::Loggable for TensorBuffer { "item", DataType::Float64, false, - ))), + ))) + .into(), offsets, PrimitiveArray::new( - DataType::Float64, + DataType::Float64.into(), f64_inner_data, f64_inner_bitmap, ) @@ -734,7 +782,7 @@ impl ::re_types_core::Loggable for TensorBuffer { }) .collect() }); - UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow_datatype().into(), types, fields, offsets).boxed() }) } @@ -746,13 +794,14 @@ impl ::re_types_core::Loggable for TensorBuffer { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -765,7 +814,7 @@ impl ::re_types_core::Loggable for TensorBuffer { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -1701,7 +1750,7 @@ impl ::re_types_core::Loggable for TensorBuffer { }), _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow2_datatype(), + Self::arrow_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 d499b8d09cc3..644a0b8c69ee 100644 --- a/crates/store/re_types/src/datatypes/tensor_data.rs +++ b/crates/store/re_types/src/datatypes/tensor_data.rs @@ -52,22 +52,22 @@ impl ::re_types_core::SizeBytes for TensorData { impl ::re_types_core::Loggable for TensorData { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "shape", DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))), false, ), Field::new( "buffer", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -82,7 +82,8 @@ impl ::re_types_core::Loggable for TensorData { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -96,7 +97,7 @@ impl ::re_types_core::Loggable for TensorData { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, shape): (Vec<_>, Vec<_>) = data @@ -124,9 +125,10 @@ impl ::re_types_core::Loggable for TensorData { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, - ))), + ))) + .into(), offsets, { _ = shape_inner_bitmap; @@ -171,13 +173,14 @@ impl ::re_types_core::Loggable for TensorData { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -195,7 +198,7 @@ impl ::re_types_core::Loggable for TensorData { let shape = { if !arrays_by_name.contains_key("shape") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "shape", )) .with_context("rerun.datatypes.TensorData"); @@ -208,7 +211,7 @@ impl ::re_types_core::Loggable for TensorData { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -261,7 +264,7 @@ impl ::re_types_core::Loggable for TensorData { let buffer = { if !arrays_by_name.contains_key("buffer") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "buffer", )) .with_context("rerun.datatypes.TensorData"); diff --git a/crates/store/re_types/src/datatypes/tensor_dimension.rs b/crates/store/re_types/src/datatypes/tensor_dimension.rs index 318c039f3ee5..f0c30b88529a 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension.rs @@ -44,10 +44,10 @@ impl ::re_types_core::SizeBytes for TensorDimension { impl ::re_types_core::Loggable for TensorDimension { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("size", DataType::UInt64, false), Field::new("name", DataType::Utf8, true), ])) @@ -62,7 +62,8 @@ impl ::re_types_core::Loggable for TensorDimension { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -76,7 +77,7 @@ impl ::re_types_core::Loggable for TensorDimension { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, size): (Vec<_>, Vec<_>) = data @@ -91,7 +92,7 @@ impl ::re_types_core::Loggable for TensorDimension { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt64, + DataType::UInt64.into(), size.into_iter().map(|v| v.unwrap_or_default()).collect(), size_bitmap, ) @@ -121,7 +122,7 @@ impl ::re_types_core::Loggable for TensorDimension { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, name_bitmap, @@ -145,13 +146,14 @@ impl ::re_types_core::Loggable for TensorDimension { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -169,7 +171,7 @@ impl ::re_types_core::Loggable for TensorDimension { let size = { if !arrays_by_name.contains_key("size") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "size", )) .with_context("rerun.datatypes.TensorDimension"); @@ -190,7 +192,7 @@ impl ::re_types_core::Loggable for TensorDimension { let name = { if !arrays_by_name.contains_key("name") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 280ca3e7149b..b2d55eabfca3 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,10 +46,10 @@ impl ::re_types_core::SizeBytes for TensorDimensionIndexSelection { impl ::re_types_core::Loggable for TensorDimensionIndexSelection { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("dimension", DataType::UInt32, false), Field::new("index", DataType::UInt64, false), ])) @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -78,7 +79,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, dimension): (Vec<_>, Vec<_>) = data @@ -93,7 +94,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), dimension .into_iter() .map(|v| v.unwrap_or_default()) @@ -115,7 +116,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt64, + DataType::UInt64.into(), index.into_iter().map(|v| v.unwrap_or_default()).collect(), index_bitmap, ) @@ -136,13 +137,14 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,7 +162,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "dimension", )) .with_context("rerun.datatypes.TensorDimensionIndexSelection"); @@ -181,7 +183,7 @@ impl ::re_types_core::Loggable for TensorDimensionIndexSelection { let index = { if !arrays_by_name.contains_key("index") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 bd1282936748..74fe871edc8c 100644 --- a/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs +++ b/crates/store/re_types/src/datatypes/tensor_dimension_selection.rs @@ -44,10 +44,10 @@ impl ::re_types_core::SizeBytes for TensorDimensionSelection { impl ::re_types_core::Loggable for TensorDimensionSelection { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("dimension", DataType::UInt32, false), Field::new("invert", DataType::Boolean, false), ])) @@ -62,7 +62,8 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -76,7 +77,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, dimension): (Vec<_>, Vec<_>) = data @@ -91,7 +92,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), dimension .into_iter() .map(|v| v.unwrap_or_default()) @@ -113,7 +114,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { any_nones.then(|| somes.into()) }; BooleanArray::new( - DataType::Boolean, + DataType::Boolean.into(), invert.into_iter().map(|v| v.unwrap_or_default()).collect(), invert_bitmap, ) @@ -134,13 +135,14 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -158,7 +160,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { let dimension = { if !arrays_by_name.contains_key("dimension") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "dimension", )) .with_context("rerun.datatypes.TensorDimensionSelection"); @@ -179,7 +181,7 @@ impl ::re_types_core::Loggable for TensorDimensionSelection { let invert = { if !arrays_by_name.contains_key("invert") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 f41e29c51595..61f6aef39274 100644 --- a/crates/store/re_types/src/datatypes/uuid.rs +++ b/crates/store/re_types/src/datatypes/uuid.rs @@ -56,12 +56,12 @@ impl From for [u8; 16usize] { impl ::re_types_core::Loggable for Uuid { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 16usize, + 16, ) } @@ -74,7 +74,8 @@ impl ::re_types_core::Loggable for Uuid { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, bytes): (Vec<_>, Vec<_>) = data .into_iter() @@ -109,9 +110,9 @@ impl ::re_types_core::Loggable for Uuid { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::UInt8, + DataType::UInt8.into(), bytes_inner_data.into_iter().collect(), bytes_inner_bitmap, ) @@ -131,13 +132,14 @@ impl ::re_types_core::Loggable for Uuid { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -205,7 +207,8 @@ impl ::re_types_core::Loggable for Uuid { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -219,7 +222,7 @@ impl ::re_types_core::Loggable for Uuid { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 16usize, + 16, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/uvec2d.rs b/crates/store/re_types/src/datatypes/uvec2d.rs index 9f81c4d61dc1..8a3220a543e0 100644 --- a/crates/store/re_types/src/datatypes/uvec2d.rs +++ b/crates/store/re_types/src/datatypes/uvec2d.rs @@ -53,12 +53,12 @@ impl From for [u32; 2usize] { impl ::re_types_core::Loggable for UVec2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 2usize, + 2, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for UVec2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for UVec2D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for UVec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for UVec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for UVec2D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/uvec3d.rs b/crates/store/re_types/src/datatypes/uvec3d.rs index ab4fde287986..3d22d04e5070 100644 --- a/crates/store/re_types/src/datatypes/uvec3d.rs +++ b/crates/store/re_types/src/datatypes/uvec3d.rs @@ -53,12 +53,12 @@ impl From for [u32; 3usize] { impl ::re_types_core::Loggable for UVec3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 3usize, + 3, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for UVec3D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for UVec3D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for UVec3D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for UVec3D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for UVec3D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 3usize, + 3, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/uvec4d.rs b/crates/store/re_types/src/datatypes/uvec4d.rs index 495401097a51..da202b7ae2f4 100644 --- a/crates/store/re_types/src/datatypes/uvec4d.rs +++ b/crates/store/re_types/src/datatypes/uvec4d.rs @@ -53,12 +53,12 @@ impl From for [u32; 4usize] { impl ::re_types_core::Loggable for UVec4D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 4usize, + 4, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for UVec4D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for UVec4D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for UVec4D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for UVec4D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for UVec4D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt32, false)), - 4usize, + 4, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/vec2d.rs b/crates/store/re_types/src/datatypes/vec2d.rs index 326cb38ce663..85ad4879b70e 100644 --- a/crates/store/re_types/src/datatypes/vec2d.rs +++ b/crates/store/re_types/src/datatypes/vec2d.rs @@ -53,12 +53,12 @@ impl From for [f32; 2usize] { impl ::re_types_core::Loggable for Vec2D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 2usize, + 2, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Vec2D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for Vec2D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for Vec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for Vec2D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for Vec2D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 2usize, + 2, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/vec3d.rs b/crates/store/re_types/src/datatypes/vec3d.rs index 2c3136fbb92f..ff1dcc07fe86 100644 --- a/crates/store/re_types/src/datatypes/vec3d.rs +++ b/crates/store/re_types/src/datatypes/vec3d.rs @@ -53,12 +53,12 @@ impl From for [f32; 3usize] { impl ::re_types_core::Loggable for Vec3D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, + 3, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Vec3D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for Vec3D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for Vec3D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for Vec3D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for Vec3D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, + 3, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/vec4d.rs b/crates/store/re_types/src/datatypes/vec4d.rs index 2b9769705843..6f6fb956fb89 100644 --- a/crates/store/re_types/src/datatypes/vec4d.rs +++ b/crates/store/re_types/src/datatypes/vec4d.rs @@ -53,12 +53,12 @@ impl From for [f32; 4usize] { impl ::re_types_core::Loggable for Vec4D { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 4usize, + 4, ) } @@ -71,7 +71,8 @@ impl ::re_types_core::Loggable for Vec4D { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -106,9 +107,9 @@ impl ::re_types_core::Loggable for Vec4D { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for Vec4D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -202,7 +204,8 @@ impl ::re_types_core::Loggable for Vec4D { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -216,7 +219,7 @@ impl ::re_types_core::Loggable for Vec4D { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 4usize, + 4, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) diff --git a/crates/store/re_types/src/datatypes/video_timestamp.rs b/crates/store/re_types/src/datatypes/video_timestamp.rs index daf22dc0fe8f..14bf4065b8af 100644 --- a/crates/store/re_types/src/datatypes/video_timestamp.rs +++ b/crates/store/re_types/src/datatypes/video_timestamp.rs @@ -58,9 +58,9 @@ impl From for i64 { impl ::re_types_core::Loggable for VideoTimestamp { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Int64 } @@ -73,7 +73,8 @@ impl ::re_types_core::Loggable for VideoTimestamp { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -88,7 +89,7 @@ impl ::re_types_core::Loggable for VideoTimestamp { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -104,12 +105,13 @@ impl ::re_types_core::Loggable for VideoTimestamp { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -130,7 +132,8 @@ impl ::re_types_core::Loggable for VideoTimestamp { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types/src/datatypes/view_coordinates.rs b/crates/store/re_types/src/datatypes/view_coordinates.rs index 4345ebcfa835..f7de8aeb8d8a 100644 --- a/crates/store/re_types/src/datatypes/view_coordinates.rs +++ b/crates/store/re_types/src/datatypes/view_coordinates.rs @@ -73,12 +73,12 @@ impl From for [u8; 3usize] { impl ::re_types_core::Loggable for ViewCoordinates { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 3usize, + 3, ) } @@ -91,7 +91,8 @@ impl ::re_types_core::Loggable for ViewCoordinates { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -126,9 +127,9 @@ impl ::re_types_core::Loggable for ViewCoordinates { .into() }); FixedSizeListArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), PrimitiveArray::new( - DataType::UInt8, + DataType::UInt8.into(), data0_inner_data.into_iter().collect(), data0_inner_bitmap, ) @@ -148,13 +149,14 @@ impl ::re_types_core::Loggable for ViewCoordinates { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -222,7 +224,8 @@ impl ::re_types_core::Loggable for ViewCoordinates { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); @@ -236,7 +239,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 3usize, + 3, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) 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 f2b41d2a1bf6..23fc88eb7ef5 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer1.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer1 { impl ::re_types_core::Loggable for AffixFuzzer1 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow_datatype() } fn to_arrow2_opt<'a>( 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 1c37ed8e1dd0..ca252cc37b6d 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer10.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer10.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer10 { impl ::re_types_core::Loggable for AffixFuzzer10 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Utf8 } @@ -82,7 +82,8 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -109,7 +110,7 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, inner_data, data0_bitmap, @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 53a59b8fb733..24a487f42cf3 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer11.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer11.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer11 { impl ::re_types_core::Loggable for AffixFuzzer11 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", DataType::Float32, @@ -86,7 +86,8 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -117,10 +118,14 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { .into(); let data0_inner_bitmap: Option = None; ListArray::try_new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, - PrimitiveArray::new(DataType::Float32, data0_inner_data, data0_inner_bitmap) - .boxed(), + PrimitiveArray::new( + DataType::Float32.into(), + data0_inner_data, + data0_inner_bitmap, + ) + .boxed(), data0_bitmap, )? .boxed() @@ -136,13 +141,14 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 fc728f88e2a3..baf938edb179 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer12.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer12.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer12 { impl ::re_types_core::Loggable for AffixFuzzer12 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", DataType::Utf8, @@ -86,7 +86,8 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -111,7 +112,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -124,7 +125,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, data0_inner_bitmap, @@ -147,13 +148,14 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 05e6dc12830d..c2e4aea264f2 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer13.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer13.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer13 { impl ::re_types_core::Loggable for AffixFuzzer13 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", DataType::Utf8, @@ -86,7 +86,8 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -111,7 +112,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -124,7 +125,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, data0_inner_bitmap, @@ -147,13 +148,14 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 4687a179c300..28c697c5aace 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer14.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer14.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer14 { impl ::re_types_core::Loggable for AffixFuzzer14 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer3::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer3::arrow_datatype() } fn to_arrow2_opt<'a>( 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 f4e7b612d576..97940644f3c7 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer15.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer15.rs @@ -66,33 +66,35 @@ impl std::ops::DerefMut for AffixFuzzer15 { impl ::re_types_core::Loggable for AffixFuzzer15 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Union( - std::sync::Arc::new(vec![ - Field::new("_null_markers", DataType::Null, true), - Field::new("degrees", DataType::Float32, false), - Field::new( - "craziness", - DataType::List(std::sync::Arc::new(Field::new( - "item", - ::arrow2_datatype(), + UnionFields::new( + vec![0, 1, 2, 3, 4], + vec![ + Field::new("_null_markers", DataType::Null, true), + Field::new("degrees", DataType::Float32, false), + Field::new( + "craziness", + DataType::List(std::sync::Arc::new(Field::new( + "item", + ::arrow_datatype(), + false, + ))), false, - ))), - false, - ), - Field::new( - "fixed_size_shenanigans", - DataType::FixedSizeList( - std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, ), - false, - ), - Field::new("empty_variant", DataType::Null, true), - ]), - Some(std::sync::Arc::new(vec![0i32, 1i32, 2i32, 3i32, 4i32])), + Field::new( + "fixed_size_shenanigans", + DataType::FixedSizeList( + std::sync::Arc::new(Field::new("item", DataType::Float32, false)), + 3, + ), + false, + ), + Field::new("empty_variant", DataType::Null, true), + ], + ), UnionMode::Dense, ) } @@ -106,7 +108,8 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -135,7 +138,8 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::AffixFuzzer3::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer15#single_optional_union")? 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 219d7765f3ce..9a6715a98a42 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer16.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer16.rs @@ -45,12 +45,12 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer16 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { _ = data0_inner_bitmap; @@ -112,13 +113,14 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 534a28d3be0b..848fefbf891f 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer17.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer17.rs @@ -45,12 +45,12 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer17 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { _ = data0_inner_bitmap; @@ -112,13 +113,14 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 bc25d2cb4863..69fdddd48a7e 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer18.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer18.rs @@ -45,12 +45,12 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer18 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { _ = data0_inner_bitmap; @@ -112,13 +113,14 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 3faf8cb8f426..d2388aa54a9a 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer19.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer19.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer19 { impl ::re_types_core::Loggable for AffixFuzzer19 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer5::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer5::arrow_datatype() } fn to_arrow2_opt<'a>( 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 6e08ac4ae15b..6198ffce321b 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer2.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer2 { impl ::re_types_core::Loggable for AffixFuzzer2 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow_datatype() } fn to_arrow2_opt<'a>( 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 5b11f9882311..0b051434900f 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer20.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer20 { impl ::re_types_core::Loggable for AffixFuzzer20 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer20::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer20::arrow_datatype() } fn to_arrow2_opt<'a>( 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 59a83ee8b033..b16f44aba56e 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer21.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer21 { impl ::re_types_core::Loggable for AffixFuzzer21 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer21::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer21::arrow_datatype() } fn to_arrow2_opt<'a>( 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 702a930cd779..6f3e7bed2cec 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer22.rs @@ -66,14 +66,14 @@ impl std::ops::DerefMut for AffixFuzzer22 { impl ::re_types_core::Loggable for AffixFuzzer22 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![Field::new( + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![Field::new( "fixed_sized_native", DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 4usize, + 4, ), false, )])) @@ -88,7 +88,8 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -117,7 +118,8 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::AffixFuzzer22::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer22#nullable_nested_array")? 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 9ba6cfddf4b1..5a3629e8eefa 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer23.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer23.rs @@ -66,18 +66,18 @@ impl std::ops::DerefMut for AffixFuzzer23 { impl ::re_types_core::Loggable for AffixFuzzer23 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "value1", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "value2", - ::arrow2_datatype(), + ::arrow_datatype(), true, ), ])) @@ -92,7 +92,8 @@ impl ::re_types_core::Loggable for AffixFuzzer23 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -121,7 +122,8 @@ impl ::re_types_core::Loggable for AffixFuzzer23 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::MultiEnum::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer23#multi_enum")? 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 af35a0419554..a6161782c1bd 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer3.rs @@ -66,8 +66,8 @@ impl std::ops::DerefMut for AffixFuzzer3 { impl ::re_types_core::Loggable for AffixFuzzer3 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::testing::datatypes::AffixFuzzer1::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::testing::datatypes::AffixFuzzer1::arrow_datatype() } fn to_arrow2_opt<'a>( 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 4ca219066dcc..31631ff304e3 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer4.rs @@ -66,10 +66,10 @@ impl std::ops::DerefMut for AffixFuzzer4 { impl ::re_types_core::Loggable for AffixFuzzer4 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("single_float_optional", DataType::Float32, true), Field::new("single_string_required", DataType::Utf8, false), Field::new("single_string_optional", DataType::Utf8, true), @@ -103,7 +103,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), @@ -119,7 +119,8 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -148,7 +149,8 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer4#single_optional")? 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 c512bb1a6e18..2a1e60c30ec2 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer5.rs @@ -66,10 +66,10 @@ impl std::ops::DerefMut for AffixFuzzer5 { impl ::re_types_core::Loggable for AffixFuzzer5 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("single_float_optional", DataType::Float32, true), Field::new("single_string_required", DataType::Utf8, false), Field::new("single_string_optional", DataType::Utf8, true), @@ -103,7 +103,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), @@ -119,7 +119,8 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -148,7 +149,8 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer5#single_optional")? 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 2262d272706f..7201c7e465b4 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer6.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer6.rs @@ -66,10 +66,10 @@ impl std::ops::DerefMut for AffixFuzzer6 { impl ::re_types_core::Loggable for AffixFuzzer6 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("single_float_optional", DataType::Float32, true), Field::new("single_string_required", DataType::Utf8, false), Field::new("single_string_optional", DataType::Utf8, true), @@ -103,7 +103,7 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), @@ -119,7 +119,8 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -148,7 +149,8 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow2_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer6#single_optional")? 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 aa10689cd4a2..a28471b432a4 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer7.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer7.rs @@ -45,12 +45,12 @@ impl, T: IntoIterator impl ::re_types_core::Loggable for AffixFuzzer7 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))) } @@ -64,7 +64,8 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { _ = data0_inner_bitmap; @@ -112,13 +113,14 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 6ad9b5b2ccd9..6584bb83cb90 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer8.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer8.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer8 { impl ::re_types_core::Loggable for AffixFuzzer8 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Float32 } @@ -82,7 +82,8 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -97,7 +98,7 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -113,12 +114,13 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 10b644a52364..d7a58f1781cb 100644 --- a/crates/store/re_types/src/testing/components/affix_fuzzer9.rs +++ b/crates/store/re_types/src/testing/components/affix_fuzzer9.rs @@ -67,9 +67,9 @@ impl std::ops::DerefMut for AffixFuzzer9 { impl ::re_types_core::Loggable for AffixFuzzer9 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Utf8 } @@ -82,7 +82,8 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -109,7 +110,7 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, inner_data, data0_bitmap, @@ -128,13 +129,14 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 d22efc615d8f..40f874c2c97a 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer1.rs @@ -63,10 +63,10 @@ impl ::re_types_core::SizeBytes for AffixFuzzer1 { impl ::re_types_core::Loggable for AffixFuzzer1 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("single_float_optional", DataType::Float32, true), Field::new("single_string_required", DataType::Utf8, false), Field::new("single_string_optional", DataType::Utf8, true), @@ -100,7 +100,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { Field::new("flattened_scalar", DataType::Float32, false), Field::new( "almost_flattened_scalar", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new("from_parent", DataType::Boolean, true), @@ -116,7 +116,8 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -130,7 +131,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, single_float_optional): (Vec<_>, Vec<_>) = data @@ -148,7 +149,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), single_float_optional .into_iter() .map(|v| v.unwrap_or_default()) @@ -186,7 +187,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, single_string_required_bitmap, @@ -225,7 +226,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, single_string_optional_bitmap, @@ -271,10 +272,11 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { "item", DataType::Float32, false, - ))), + ))) + .into(), offsets, PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), many_floats_optional_inner_data, many_floats_optional_inner_bitmap, ) @@ -318,7 +320,8 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { "item", DataType::Utf8, false, - ))), + ))) + .into(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -335,7 +338,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, many_strings_required_inner_bitmap, @@ -383,7 +386,8 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { "item", DataType::Utf8, false, - ))), + ))) + .into(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -400,7 +404,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, many_strings_optional_inner_bitmap, @@ -427,7 +431,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), flattened_scalar .into_iter() .map(|v| v.unwrap_or_default()) @@ -473,7 +477,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { any_nones.then(|| somes.into()) }; BooleanArray::new( - DataType::Boolean, + DataType::Boolean.into(), from_parent .into_iter() .map(|v| v.unwrap_or_default()) @@ -497,13 +501,14 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -521,7 +526,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::arrow2_datatype(), + Self::arrow_datatype(), "single_float_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -542,7 +547,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::arrow2_datatype(), + Self::arrow_datatype(), "single_string_required", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -599,7 +604,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::arrow2_datatype(), + Self::arrow_datatype(), "single_string_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -656,7 +661,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::arrow2_datatype(), + Self::arrow_datatype(), "many_floats_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -731,7 +736,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::arrow2_datatype(), + Self::arrow_datatype(), "many_strings_required", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -852,7 +857,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::arrow2_datatype(), + Self::arrow_datatype(), "many_strings_optional", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -973,7 +978,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::arrow2_datatype(), + Self::arrow_datatype(), "flattened_scalar", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -994,7 +999,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype(), "almost_flattened_scalar", )) .with_context("rerun.testing.datatypes.AffixFuzzer1"); @@ -1009,7 +1014,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::arrow2_datatype(), + Self::arrow_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 7c95e803d809..070ae5cf38ae 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer2.rs @@ -51,9 +51,9 @@ impl From for Option { impl ::re_types_core::Loggable for AffixFuzzer2 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Float32 } @@ -66,7 +66,8 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -81,7 +82,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -97,12 +98,13 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 95e91b3ac20e..663d5160ef6f 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer20.rs @@ -41,18 +41,18 @@ impl ::re_types_core::SizeBytes for AffixFuzzer20 { impl ::re_types_core::Loggable for AffixFuzzer20 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "p", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "s", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -67,7 +67,8 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -81,7 +82,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, p): (Vec<_>, Vec<_>) = data @@ -96,7 +97,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::UInt32, + DataType::UInt32.into(), p.into_iter() .map(|datum| datum.map(|datum| datum.0).unwrap_or_default()) .collect(), @@ -132,7 +133,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, s_bitmap, @@ -156,13 +157,14 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -180,7 +182,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { let p = { if !arrays_by_name.contains_key("p") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "p", )) .with_context("rerun.testing.datatypes.AffixFuzzer20"); @@ -204,7 +206,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { let s = { if !arrays_by_name.contains_key("s") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 37aef1bbab50..3aef143f90d8 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer21.rs @@ -40,10 +40,10 @@ impl ::re_types_core::SizeBytes for AffixFuzzer21 { impl ::re_types_core::Loggable for AffixFuzzer21 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new("single_half", DataType::Float16, false), Field::new( "many_halves", @@ -66,7 +66,8 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -80,7 +81,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, single_half): (Vec<_>, Vec<_>) = data @@ -95,7 +96,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Float16, + DataType::Float16.into(), single_half .into_iter() .map(|v| v.unwrap_or_default()) @@ -137,10 +138,11 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { "item", DataType::Float16, false, - ))), + ))) + .into(), offsets, PrimitiveArray::new( - DataType::Float16, + DataType::Float16.into(), many_halves_inner_data, many_halves_inner_bitmap, ) @@ -165,13 +167,14 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -189,7 +192,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::arrow2_datatype(), + Self::arrow_datatype(), "single_half", )) .with_context("rerun.testing.datatypes.AffixFuzzer21"); @@ -210,7 +213,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::arrow2_datatype(), + Self::arrow_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 a0d493405db4..9fc33457b8b9 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer22.rs @@ -53,14 +53,14 @@ impl From for [u8; 4usize] { impl ::re_types_core::Loggable for AffixFuzzer22 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![Field::new( + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![Field::new( "fixed_sized_native", DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 4usize, + 4, ), false, )])) @@ -75,7 +75,8 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +90,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![{ let (somes, fixed_sized_native): (Vec<_>, Vec<_>) = data .iter() @@ -126,10 +127,11 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { FixedSizeListArray::new( DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 4usize, - ), + 4, + ) + .into(), PrimitiveArray::new( - DataType::UInt8, + DataType::UInt8.into(), fixed_sized_native_inner_data.into_iter().collect(), fixed_sized_native_inner_bitmap, ) @@ -153,13 +155,14 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -177,7 +180,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::arrow2_datatype(), + Self::arrow_datatype(), "fixed_sized_native", )) .with_context("rerun.testing.datatypes.AffixFuzzer22"); @@ -190,7 +193,7 @@ impl ::re_types_core::Loggable for AffixFuzzer22 { .ok_or_else(|| { let expected = DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::UInt8, false)), - 4usize, + 4, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) 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 61c3daf2a70c..f32c9e182238 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer3.rs @@ -50,33 +50,35 @@ impl ::re_types_core::SizeBytes for AffixFuzzer3 { impl ::re_types_core::Loggable for AffixFuzzer3 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Union( - std::sync::Arc::new(vec![ - Field::new("_null_markers", DataType::Null, true), - Field::new("degrees", DataType::Float32, false), - Field::new( - "craziness", - DataType::List(std::sync::Arc::new(Field::new( - "item", - ::arrow2_datatype(), + UnionFields::new( + vec![0, 1, 2, 3, 4], + vec![ + Field::new("_null_markers", DataType::Null, true), + Field::new("degrees", DataType::Float32, false), + Field::new( + "craziness", + DataType::List(std::sync::Arc::new(Field::new( + "item", + ::arrow_datatype(), + false, + ))), false, - ))), - false, - ), - Field::new( - "fixed_size_shenanigans", - DataType::FixedSizeList( - std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, ), - false, - ), - Field::new("empty_variant", DataType::Null, true), - ]), - Some(std::sync::Arc::new(vec![0i32, 1i32, 2i32, 3i32, 4i32])), + Field::new( + "fixed_size_shenanigans", + DataType::FixedSizeList( + std::sync::Arc::new(Field::new("item", DataType::Float32, false)), + 3, + ), + false, + ), + Field::new("empty_variant", DataType::Null, true), + ], + ), UnionMode::Dense, ) } @@ -90,7 +92,8 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ // Dense Arrow union let data: Vec<_> = data @@ -111,7 +114,11 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { }) .collect(); let fields = vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()).boxed(), + NullArray::new( + arrow2::datatypes::DataType::Null, + data.iter().filter(|v| v.is_none()).count(), + ) + .boxed(), { let degrees: Vec<_> = data .iter() @@ -122,7 +129,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .collect(); let degrees_bitmap: Option = None; PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), degrees.into_iter().collect(), degrees_bitmap, ) @@ -149,9 +156,10 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, - ))), + ))) + .into(), offsets, { _ = craziness_inner_bitmap; @@ -182,10 +190,11 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { FixedSizeListArray::new( DataType::FixedSizeList( std::sync::Arc::new(Field::new("item", DataType::Float32, false)), - 3usize, - ), + 3, + ) + .into(), PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), fixed_size_shenanigans_inner_data.into_iter().collect(), fixed_size_shenanigans_inner_bitmap, ) @@ -196,7 +205,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { } }, NullArray::new( - DataType::Null, + arrow2::datatypes::DataType::Null, data.iter() .filter(|datum| matches!(datum.as_deref(), Some(Self::EmptyVariant))) .count(), @@ -239,7 +248,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { }) .collect() }); - UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow_datatype().into(), types, fields, offsets).boxed() }) } @@ -251,13 +260,14 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -270,7 +280,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -312,7 +322,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -379,7 +389,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { std::sync::Arc::new( Field::new("item", DataType::Float32, false), ), - 3usize, + 3, ); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) @@ -531,7 +541,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { _ => { return Err( DeserializationError::missing_union_arm( - Self::arrow2_datatype(), + Self::arrow_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 d9dd23bdda6a..cb52d1e578ea 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer4.rs @@ -45,28 +45,30 @@ impl ::re_types_core::SizeBytes for AffixFuzzer4 { impl ::re_types_core::Loggable for AffixFuzzer4 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Union( - std::sync::Arc::new(vec![ - Field::new("_null_markers", DataType::Null, true), - Field::new( - "single_required", - ::arrow2_datatype(), - false, - ), - Field::new( - "many_required", - DataType::List(std::sync::Arc::new(Field::new( - "item", - ::arrow2_datatype(), + UnionFields::new( + vec![0, 1, 2], + vec![ + Field::new("_null_markers", DataType::Null, true), + Field::new( + "single_required", + ::arrow_datatype(), false, - ))), - false, - ), - ]), - Some(std::sync::Arc::new(vec![0i32, 1i32, 2i32])), + ), + Field::new( + "many_required", + DataType::List(std::sync::Arc::new(Field::new( + "item", + ::arrow_datatype(), + false, + ))), + false, + ), + ], + ), UnionMode::Dense, ) } @@ -80,7 +82,8 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ // Dense Arrow union let data: Vec<_> = data @@ -99,7 +102,11 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }) .collect(); let fields = vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()).boxed(), + NullArray::new( + arrow2::datatypes::DataType::Null, + data.iter().filter(|v| v.is_none()).count(), + ) + .boxed(), { let single_required: Vec<_> = data .iter() @@ -137,9 +144,10 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { ListArray::try_new( DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, - ))), + ))) + .into(), offsets, { _ = many_required_inner_bitmap; @@ -177,7 +185,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }) .collect() }); - UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow_datatype().into(), types, fields, offsets).boxed() }) } @@ -189,13 +197,14 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -208,7 +217,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -242,7 +251,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { .ok_or_else(|| { let expected = DataType::List(std::sync::Arc::new(Field::new( "item", - ::arrow2_datatype(), + ::arrow_datatype(), false, ))); let actual = arrow_data.data_type().clone(); @@ -344,7 +353,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { }), _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow2_datatype(), + Self::arrow_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 73539660664a..468ab9becfc6 100644 --- a/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs +++ b/crates/store/re_types/src/testing/datatypes/affix_fuzzer5.rs @@ -70,12 +70,12 @@ impl std::ops::DerefMut for AffixFuzzer5 { impl ::re_types_core::Loggable for AffixFuzzer5 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![Field::new( + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![Field::new( "single_optional_union", - ::arrow2_datatype(), + ::arrow_datatype(), true, )])) } @@ -89,7 +89,8 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -103,7 +104,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![{ let (somes, single_optional_union): (Vec<_>, Vec<_>) = data .iter() @@ -140,13 +141,14 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -164,7 +166,7 @@ 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::arrow2_datatype(), + Self::arrow_datatype(), "single_optional_union", )) .with_context("rerun.testing.datatypes.AffixFuzzer5"); 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 a9dc54bd359c..18bd4f253eca 100644 --- a/crates/store/re_types/src/testing/datatypes/enum_test.rs +++ b/crates/store/re_types/src/testing/datatypes/enum_test.rs @@ -98,9 +98,9 @@ impl std::fmt::Display for EnumTest { impl ::re_types_core::Loggable for EnumTest { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -113,7 +113,8 @@ impl ::re_types_core::Loggable for EnumTest { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -128,7 +129,7 @@ impl ::re_types_core::Loggable for EnumTest { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -144,12 +145,13 @@ impl ::re_types_core::Loggable for EnumTest { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -165,7 +167,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::arrow2_datatype(), + Self::arrow_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 c2026cf16e19..5d703e045abd 100644 --- a/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs +++ b/crates/store/re_types/src/testing/datatypes/flattened_scalar.rs @@ -53,10 +53,10 @@ impl From for f32 { impl ::re_types_core::Loggable for FlattenedScalar { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![Field::new( + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![Field::new( "value", DataType::Float32, false, @@ -72,7 +72,8 @@ impl ::re_types_core::Loggable for FlattenedScalar { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +87,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![{ let (somes, value): (Vec<_>, Vec<_>) = data .iter() @@ -100,7 +101,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - DataType::Float32, + DataType::Float32.into(), value.into_iter().map(|v| v.unwrap_or_default()).collect(), value_bitmap, ) @@ -120,13 +121,14 @@ impl ::re_types_core::Loggable for FlattenedScalar { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -144,7 +146,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { let value = { if !arrays_by_name.contains_key("value") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_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 dcd3d57bac70..ee199b47177f 100644 --- a/crates/store/re_types/src/testing/datatypes/multi_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/multi_enum.rs @@ -44,18 +44,18 @@ impl ::re_types_core::SizeBytes for MultiEnum { impl ::re_types_core::Loggable for MultiEnum { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "value1", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "value2", - ::arrow2_datatype(), + ::arrow_datatype(), true, ), ])) @@ -70,7 +70,8 @@ impl ::re_types_core::Loggable for MultiEnum { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +85,7 @@ impl ::re_types_core::Loggable for MultiEnum { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, value1): (Vec<_>, Vec<_>) = data @@ -136,13 +137,14 @@ impl ::re_types_core::Loggable for MultiEnum { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,7 +162,7 @@ impl ::re_types_core::Loggable for MultiEnum { let value1 = { if !arrays_by_name.contains_key("value1") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "value1", )) .with_context("rerun.testing.datatypes.MultiEnum"); @@ -173,7 +175,7 @@ impl ::re_types_core::Loggable for MultiEnum { let value2 = { if !arrays_by_name.contains_key("value2") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "value2", )) .with_context("rerun.testing.datatypes.MultiEnum"); 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 19909bf4eb34..ce330f882d93 100644 --- a/crates/store/re_types/src/testing/datatypes/primitive_component.rs +++ b/crates/store/re_types/src/testing/datatypes/primitive_component.rs @@ -52,9 +52,9 @@ impl From for u32 { impl ::re_types_core::Loggable for PrimitiveComponent { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt32 } @@ -67,7 +67,8 @@ impl ::re_types_core::Loggable for PrimitiveComponent { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,7 +83,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -98,12 +99,13 @@ impl ::re_types_core::Loggable for PrimitiveComponent { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +126,8 @@ impl ::re_types_core::Loggable for PrimitiveComponent { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); 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 b3b776a761c4..49d4e3e9cb15 100644 --- a/crates/store/re_types/src/testing/datatypes/string_component.rs +++ b/crates/store/re_types/src/testing/datatypes/string_component.rs @@ -52,9 +52,9 @@ impl From for ::re_types_core::ArrowString { impl ::re_types_core::Loggable for StringComponent { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Utf8 } @@ -67,7 +67,8 @@ impl ::re_types_core::Loggable for StringComponent { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -94,7 +95,7 @@ impl ::re_types_core::Loggable for StringComponent { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, inner_data, data0_bitmap, @@ -113,13 +114,14 @@ impl ::re_types_core::Loggable for StringComponent { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 fd4120ce6125..33cd899e675a 100644 --- a/crates/store/re_types/src/testing/datatypes/valued_enum.rs +++ b/crates/store/re_types/src/testing/datatypes/valued_enum.rs @@ -80,9 +80,9 @@ impl std::fmt::Display for ValuedEnum { impl ::re_types_core::Loggable for ValuedEnum { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -95,7 +95,8 @@ impl ::re_types_core::Loggable for ValuedEnum { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -110,7 +111,7 @@ impl ::re_types_core::Loggable for ValuedEnum { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -126,12 +127,13 @@ impl ::re_types_core::Loggable for ValuedEnum { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -145,7 +147,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::arrow2_datatype(), + Self::arrow_datatype(), "", invalid as _, )), 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 360a2a010205..c976534556d0 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,8 +68,8 @@ impl std::ops::DerefMut for AutoLayout { impl ::re_types_core::Loggable for AutoLayout { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 6d6dcbb85433..797a9f14876d 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,8 +68,8 @@ impl std::ops::DerefMut for AutoSpaceViews { impl ::re_types_core::Loggable for AutoSpaceViews { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( 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 5ebb190b29aa..af6b6fd6d5b3 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,9 +81,9 @@ impl std::fmt::Display for ContainerKind { impl ::re_types_core::Loggable for ContainerKind { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt8 } @@ -96,7 +96,8 @@ impl ::re_types_core::Loggable for ContainerKind { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -111,7 +112,7 @@ impl ::re_types_core::Loggable for ContainerKind { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -127,12 +128,13 @@ impl ::re_types_core::Loggable for ContainerKind { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -146,7 +148,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::arrow2_datatype(), + Self::arrow_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 ba34790b1828..468eb395f924 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,8 +70,8 @@ impl std::ops::DerefMut for GridColumns { impl ::re_types_core::Loggable for GridColumns { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::UInt32::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::UInt32::arrow_datatype() } fn to_arrow2_opt<'a>( 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 35c9ab3a2602..4e2538c66fb9 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,8 +68,8 @@ impl std::ops::DerefMut for IncludedSpaceView { impl ::re_types_core::Loggable for IncludedSpaceView { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Uuid::arrow_datatype() } fn to_arrow2_opt<'a>( 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 689504890fb6..da8acada3789 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,8 +71,8 @@ impl std::ops::DerefMut for RootContainer { impl ::re_types_core::Loggable for RootContainer { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Uuid::arrow_datatype() } fn to_arrow2_opt<'a>( 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 fafdbb6a51cf..062f4e5d3bc0 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,8 +68,8 @@ impl std::ops::DerefMut for SpaceViewMaximized { impl ::re_types_core::Loggable for SpaceViewMaximized { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Uuid::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Uuid::arrow_datatype() } fn to_arrow2_opt<'a>( 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 ece137edb0db..82bc233e67e1 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,8 +103,8 @@ impl std::ops::DerefMut for VisualizerOverrides { impl ::re_types_core::Loggable for VisualizerOverrides { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::blueprint::datatypes::Utf8List::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::blueprint::datatypes::Utf8List::arrow_datatype() } fn to_arrow2_opt<'a>( 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 2dfbf0df0ecf..7b079ff28f06 100644 --- a/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs +++ b/crates/store/re_types_blueprint/src/blueprint/datatypes/utf8list.rs @@ -53,9 +53,9 @@ impl From for Vec<::re_types_core::ArrowString> { impl ::re_types_core::Loggable for Utf8List { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::List(std::sync::Arc::new(Field::new( "item", DataType::Utf8, @@ -72,7 +72,8 @@ impl ::re_types_core::Loggable for Utf8List { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -97,7 +98,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::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, { let offsets = arrow2::offset::Offsets::::try_from_lengths( @@ -110,7 +111,7 @@ impl ::re_types_core::Loggable for Utf8List { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, data0_inner_bitmap, @@ -133,13 +134,14 @@ impl ::re_types_core::Loggable for Utf8List { { #![allow(clippy::wildcard_imports)] use ::re_types_core::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) 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 a9c92574dcd8..f45db2e65b45 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,8 +70,8 @@ crate::macros::impl_into_cow!(ClearIsRecursive); impl crate::Loggable for ClearIsRecursive { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { - crate::datatypes::Bool::arrow2_datatype() + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() } fn to_arrow2_opt<'a>( diff --git a/crates/store/re_types_core/src/datatypes/bool.rs b/crates/store/re_types_core/src/datatypes/bool.rs index b66bdfd0a3c6..afcd6aa88995 100644 --- a/crates/store/re_types_core/src/datatypes/bool.rs +++ b/crates/store/re_types_core/src/datatypes/bool.rs @@ -53,9 +53,9 @@ crate::macros::impl_into_cow!(Bool); impl crate::Loggable for Bool { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Boolean } @@ -68,7 +68,8 @@ impl crate::Loggable for Bool { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +84,7 @@ impl crate::Loggable for Bool { any_nones.then(|| somes.into()) }; BooleanArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -99,12 +100,13 @@ impl crate::Loggable for Bool { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 99bb1f1aa615..57714f3eeb01 100644 --- a/crates/store/re_types_core/src/datatypes/entity_path.rs +++ b/crates/store/re_types_core/src/datatypes/entity_path.rs @@ -53,9 +53,9 @@ crate::macros::impl_into_cow!(EntityPath); impl crate::Loggable for EntityPath { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Utf8 } @@ -68,7 +68,8 @@ impl crate::Loggable for EntityPath { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,7 +96,7 @@ impl crate::Loggable for EntityPath { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, inner_data, data0_bitmap, @@ -114,13 +115,14 @@ impl crate::Loggable for EntityPath { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 c026a78e7b86..af808a56775c 100644 --- a/crates/store/re_types_core/src/datatypes/float32.rs +++ b/crates/store/re_types_core/src/datatypes/float32.rs @@ -53,9 +53,9 @@ crate::macros::impl_into_cow!(Float32); impl crate::Loggable for Float32 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Float32 } @@ -68,7 +68,8 @@ impl crate::Loggable for Float32 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +84,7 @@ impl crate::Loggable for Float32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -99,12 +100,13 @@ impl crate::Loggable for Float32 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -125,7 +127,8 @@ impl crate::Loggable for Float32 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types_core/src/datatypes/float64.rs b/crates/store/re_types_core/src/datatypes/float64.rs index e1971f0c6f44..b7395356b011 100644 --- a/crates/store/re_types_core/src/datatypes/float64.rs +++ b/crates/store/re_types_core/src/datatypes/float64.rs @@ -53,9 +53,9 @@ crate::macros::impl_into_cow!(Float64); impl crate::Loggable for Float64 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Float64 } @@ -68,7 +68,8 @@ impl crate::Loggable for Float64 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +84,7 @@ impl crate::Loggable for Float64 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -99,12 +100,13 @@ impl crate::Loggable for Float64 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -125,7 +127,8 @@ impl crate::Loggable for Float64 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); 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 8f85561d5cec..d84e9b5aee4a 100644 --- a/crates/store/re_types_core/src/datatypes/time_int.rs +++ b/crates/store/re_types_core/src/datatypes/time_int.rs @@ -52,9 +52,9 @@ crate::macros::impl_into_cow!(TimeInt); impl crate::Loggable for TimeInt { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Int64 } @@ -67,7 +67,8 @@ impl crate::Loggable for TimeInt { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,7 +83,7 @@ impl crate::Loggable for TimeInt { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -98,12 +99,13 @@ impl crate::Loggable for TimeInt { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +126,8 @@ impl crate::Loggable for TimeInt { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); 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 f039d35ef13d..7089e285a08d 100644 --- a/crates/store/re_types_core/src/datatypes/time_range.rs +++ b/crates/store/re_types_core/src/datatypes/time_range.rs @@ -45,18 +45,18 @@ crate::macros::impl_into_cow!(TimeRange); impl crate::Loggable for TimeRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "start", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "end", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -71,7 +71,8 @@ impl crate::Loggable for TimeRange { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -85,7 +86,7 @@ impl crate::Loggable for TimeRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, start): (Vec<_>, Vec<_>) = data @@ -136,13 +137,14 @@ impl crate::Loggable for TimeRange { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -160,7 +162,7 @@ impl crate::Loggable for TimeRange { let start = { if !arrays_by_name.contains_key("start") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "start", )) .with_context("rerun.datatypes.TimeRange"); @@ -173,7 +175,7 @@ impl crate::Loggable for TimeRange { let end = { if !arrays_by_name.contains_key("end") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "end", )) .with_context("rerun.datatypes.TimeRange"); 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 80c7defd2f79..aaa3095c2f7b 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,25 +52,27 @@ crate::macros::impl_into_cow!(TimeRangeBoundary); impl crate::Loggable for TimeRangeBoundary { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Union( - std::sync::Arc::new(vec![ - Field::new("_null_markers", DataType::Null, true), - Field::new( - "CursorRelative", - ::arrow2_datatype(), - false, - ), - Field::new( - "Absolute", - ::arrow2_datatype(), - false, - ), - Field::new("Infinite", DataType::Null, true), - ]), - Some(std::sync::Arc::new(vec![0i32, 1i32, 2i32, 3i32])), + UnionFields::new( + vec![0, 1, 2, 3], + vec![ + Field::new("_null_markers", DataType::Null, true), + Field::new( + "CursorRelative", + ::arrow_datatype(), + false, + ), + Field::new( + "Absolute", + ::arrow_datatype(), + false, + ), + Field::new("Infinite", DataType::Null, true), + ], + ), UnionMode::Dense, ) } @@ -84,7 +86,8 @@ impl crate::Loggable for TimeRangeBoundary { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ // Dense Arrow union let data: Vec<_> = data @@ -104,7 +107,11 @@ impl crate::Loggable for TimeRangeBoundary { }) .collect(); let fields = vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()).boxed(), + NullArray::new( + arrow2::datatypes::DataType::Null, + data.iter().filter(|v| v.is_none()).count(), + ) + .boxed(), { let cursor_relative: Vec<_> = data .iter() @@ -115,7 +122,7 @@ impl crate::Loggable for TimeRangeBoundary { .collect(); let cursor_relative_bitmap: Option = None; PrimitiveArray::new( - DataType::Int64, + DataType::Int64.into(), cursor_relative.into_iter().map(|datum| datum.0).collect(), cursor_relative_bitmap, ) @@ -131,14 +138,14 @@ impl crate::Loggable for TimeRangeBoundary { .collect(); let absolute_bitmap: Option = None; PrimitiveArray::new( - DataType::Int64, + DataType::Int64.into(), absolute.into_iter().map(|datum| datum.0).collect(), absolute_bitmap, ) .boxed() }, NullArray::new( - DataType::Null, + arrow2::datatypes::DataType::Null, data.iter() .filter(|datum| matches!(datum.as_deref(), Some(Self::Infinite))) .count(), @@ -175,7 +182,7 @@ impl crate::Loggable for TimeRangeBoundary { }) .collect() }); - UnionArray::new(Self::arrow2_datatype(), types, fields, offsets).boxed() + UnionArray::new(Self::arrow_datatype().into(), types, fields, offsets).boxed() }) } @@ -187,13 +194,14 @@ impl crate::Loggable for TimeRangeBoundary { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -206,7 +214,7 @@ impl crate::Loggable for TimeRangeBoundary { let arrow_data_offsets = arrow_data .offsets() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -306,7 +314,7 @@ impl crate::Loggable for TimeRangeBoundary { 3i8 => Self::Infinite, _ => { return Err(DeserializationError::missing_union_arm( - Self::arrow2_datatype(), + Self::arrow_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 e02e98637243..d72659834ab0 100644 --- a/crates/store/re_types_core/src/datatypes/uint16.rs +++ b/crates/store/re_types_core/src/datatypes/uint16.rs @@ -52,9 +52,9 @@ crate::macros::impl_into_cow!(UInt16); impl crate::Loggable for UInt16 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt16 } @@ -67,7 +67,8 @@ impl crate::Loggable for UInt16 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,7 +83,7 @@ impl crate::Loggable for UInt16 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -98,12 +99,13 @@ impl crate::Loggable for UInt16 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +126,8 @@ impl crate::Loggable for UInt16 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types_core/src/datatypes/uint32.rs b/crates/store/re_types_core/src/datatypes/uint32.rs index 61a1e11832fc..9f64b394645c 100644 --- a/crates/store/re_types_core/src/datatypes/uint32.rs +++ b/crates/store/re_types_core/src/datatypes/uint32.rs @@ -52,9 +52,9 @@ crate::macros::impl_into_cow!(UInt32); impl crate::Loggable for UInt32 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt32 } @@ -67,7 +67,8 @@ impl crate::Loggable for UInt32 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,7 +83,7 @@ impl crate::Loggable for UInt32 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -98,12 +99,13 @@ impl crate::Loggable for UInt32 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +126,8 @@ impl crate::Loggable for UInt32 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types_core/src/datatypes/uint64.rs b/crates/store/re_types_core/src/datatypes/uint64.rs index 83698dfcca6f..e3bd7be8887b 100644 --- a/crates/store/re_types_core/src/datatypes/uint64.rs +++ b/crates/store/re_types_core/src/datatypes/uint64.rs @@ -52,9 +52,9 @@ crate::macros::impl_into_cow!(UInt64); impl crate::Loggable for UInt64 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::UInt64 } @@ -67,7 +67,8 @@ impl crate::Loggable for UInt64 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,7 +83,7 @@ impl crate::Loggable for UInt64 { any_nones.then(|| somes.into()) }; PrimitiveArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), data0.into_iter().map(|v| v.unwrap_or_default()).collect(), data0_bitmap, ) @@ -98,12 +99,13 @@ impl crate::Loggable for UInt64 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -124,7 +126,8 @@ impl crate::Loggable for UInt64 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(DeserializationError::missing_data()); diff --git a/crates/store/re_types_core/src/datatypes/utf8.rs b/crates/store/re_types_core/src/datatypes/utf8.rs index 963eeaf2ef16..d835960f3054 100644 --- a/crates/store/re_types_core/src/datatypes/utf8.rs +++ b/crates/store/re_types_core/src/datatypes/utf8.rs @@ -53,9 +53,9 @@ crate::macros::impl_into_cow!(Utf8); impl crate::Loggable for Utf8 { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; + use arrow::datatypes::*; DataType::Utf8 } @@ -68,7 +68,8 @@ impl crate::Loggable for Utf8 { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,7 +96,7 @@ impl crate::Loggable for Utf8 { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), offsets, inner_data, data0_bitmap, @@ -114,13 +115,14 @@ impl crate::Loggable for Utf8 { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::>() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_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 0789ac03f64b..c2fcf4ff6902 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,18 +44,18 @@ crate::macros::impl_into_cow!(VisibleTimeRange); impl crate::Loggable for VisibleTimeRange { #[inline] - fn arrow2_datatype() -> arrow2::datatypes::DataType { + fn arrow_datatype() -> arrow::datatypes::DataType { #![allow(clippy::wildcard_imports)] - use arrow2::datatypes::*; - DataType::Struct(std::sync::Arc::new(vec![ + use arrow::datatypes::*; + DataType::Struct(Fields::from(vec![ Field::new( "timeline", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), Field::new( "range", - ::arrow2_datatype(), + ::arrow_datatype(), false, ), ])) @@ -70,7 +70,8 @@ impl crate::Loggable for VisibleTimeRange { #![allow(clippy::wildcard_imports)] #![allow(clippy::manual_is_variant_and)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::array::*; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +85,7 @@ impl crate::Loggable for VisibleTimeRange { any_nones.then(|| somes.into()) }; StructArray::new( - Self::arrow2_datatype(), + Self::arrow_datatype().into(), vec![ { let (somes, timeline): (Vec<_>, Vec<_>) = data @@ -114,7 +115,7 @@ impl crate::Loggable for VisibleTimeRange { #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( - DataType::Utf8, + DataType::Utf8.into(), offsets, inner_data, timeline_bitmap, @@ -155,13 +156,14 @@ impl crate::Loggable for VisibleTimeRange { { #![allow(clippy::wildcard_imports)] use crate::{Loggable as _, ResultExt as _}; - use arrow2::{array::*, buffer::*, datatypes::*}; + use arrow::datatypes::*; + use arrow2::{array::*, buffer::*}; Ok({ let arrow_data = arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - let expected = Self::arrow2_datatype(); + let expected = Self::arrow_datatype(); let actual = arrow_data.data_type().clone(); DeserializationError::datatype_mismatch(expected, actual) }) @@ -179,7 +181,7 @@ impl crate::Loggable for VisibleTimeRange { let timeline = { if !arrays_by_name.contains_key("timeline") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "timeline", )) .with_context("rerun.datatypes.VisibleTimeRange"); @@ -232,7 +234,7 @@ impl crate::Loggable for VisibleTimeRange { let range = { if !arrays_by_name.contains_key("range") { return Err(DeserializationError::missing_struct_field( - Self::arrow2_datatype(), + Self::arrow_datatype(), "range", )) .with_context("rerun.datatypes.VisibleTimeRange"); diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index e331da70b718..de50e21d169e 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -18,11 +18,13 @@ use crate::{Archetype, ComponentBatch, LoggableBatch}; pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// The underlying [`arrow::datatypes::DataType`], excluding datatype extensions. fn arrow_datatype() -> arrow::datatypes::DataType { - Self::arrow2_datatype().into() + Self::arrow2_datatype().into() // TODO(#3741): remove as part of porting to arrow2 (obviously) } /// The underlying [`arrow2::datatypes::DataType`], excluding datatype extensions. - fn arrow2_datatype() -> arrow2::datatypes::DataType; + fn arrow2_datatype() -> arrow2::datatypes::DataType { + Self::arrow_datatype().into() + } /// Given an iterator of options of owned or reference values to the current /// [`Loggable`], serializes them into an Arrow array. diff --git a/crates/store/re_types_core/src/result.rs b/crates/store/re_types_core/src/result.rs index c1dd1f411b3c..181c600532bd 100644 --- a/crates/store/re_types_core/src/result.rs +++ b/crates/store/re_types_core/src/result.rs @@ -145,7 +145,7 @@ pub enum DeserializationError { #[error("Expected field {field_name:?} to be present in {datatype:#?}")] MissingStructField { - datatype: ::arrow2::datatypes::DataType, + datatype: arrow2::datatypes::DataType, field_name: String, backtrace: _Backtrace, }, @@ -163,7 +163,7 @@ pub enum DeserializationError { #[error("Expected union arm {arm_name:?} (#{arm_index}) to be present in {datatype:#?}")] MissingUnionArm { - datatype: ::arrow2::datatypes::DataType, + datatype: arrow2::datatypes::DataType, arm_name: String, arm_index: usize, backtrace: _Backtrace, @@ -171,8 +171,8 @@ pub enum DeserializationError { #[error("Expected {expected:#?} but found {got:#?} instead")] DatatypeMismatch { - expected: ::arrow2::datatypes::DataType, - got: ::arrow2::datatypes::DataType, + expected: arrow2::datatypes::DataType, + got: arrow2::datatypes::DataType, backtrace: _Backtrace, }, @@ -229,11 +229,11 @@ impl DeserializationError { #[inline] pub fn missing_struct_field( - datatype: arrow2::datatypes::DataType, + datatype: impl Into, field_name: impl AsRef, ) -> Self { Self::MissingStructField { - datatype, + datatype: datatype.into(), field_name: field_name.as_ref().into(), backtrace: ::backtrace::Backtrace::new_unresolved(), } @@ -257,12 +257,12 @@ impl DeserializationError { #[inline] pub fn missing_union_arm( - datatype: arrow2::datatypes::DataType, + datatype: impl Into, arm_name: impl AsRef, arm_index: usize, ) -> Self { Self::MissingUnionArm { - datatype, + datatype: datatype.into(), arm_name: arm_name.as_ref().into(), arm_index, backtrace: ::backtrace::Backtrace::new_unresolved(), @@ -271,12 +271,12 @@ impl DeserializationError { #[inline] pub fn datatype_mismatch( - expected: arrow2::datatypes::DataType, - got: arrow2::datatypes::DataType, + expected: impl Into, + got: impl Into, ) -> Self { Self::DatatypeMismatch { - expected, - got, + expected: expected.into(), + got: got.into(), backtrace: ::backtrace::Backtrace::new_unresolved(), } } From 7edf9326922761976acded3ffbe817ccf9d0ca95 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 22 Nov 2024 15:34:31 +0100 Subject: [PATCH 2/4] Add missing include --- Cargo.lock | 1 + crates/store/re_types_blueprint/Cargo.toml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index dbb9180cd917..f9c52a68f109 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6303,6 +6303,7 @@ dependencies = [ name = "re_types_blueprint" version = "0.21.0-alpha.1+dev" dependencies = [ + "arrow", "once_cell", "re_arrow2", "re_tracing", diff --git a/crates/store/re_types_blueprint/Cargo.toml b/crates/store/re_types_blueprint/Cargo.toml index ac6d142211f4..2be0628e2c03 100644 --- a/crates/store/re_types_blueprint/Cargo.toml +++ b/crates/store/re_types_blueprint/Cargo.toml @@ -31,9 +31,11 @@ re_types.workspace = true re_types_core.workspace = true # External +arrow.workspace = true arrow2 = { workspace = true, features = [ + "arrow", + "compute_concatenate", "io_ipc", "io_print", - "compute_concatenate", ] } once_cell.workspace = true From 36162f55f13eeed038ee7f1c8fa15692d503744d Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 22 Nov 2024 18:48:40 +0100 Subject: [PATCH 3/4] Use a mor sane arrow2 Loggable API --- crates/store/re_types_core/src/loggable.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/crates/store/re_types_core/src/loggable.rs b/crates/store/re_types_core/src/loggable.rs index de50e21d169e..c4f143969d9d 100644 --- a/crates/store/re_types_core/src/loggable.rs +++ b/crates/store/re_types_core/src/loggable.rs @@ -34,11 +34,11 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// 2^63 for large arrays). fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> SerializationResult + ) -> SerializationResult where Self: 'a, { - Self::to_arrow2_opt(data).map(|array| arrow2::array::to_data(array.as_ref())) + Self::to_arrow2_opt(data).map(|array| array.into()) } /// Given an iterator of options of owned or reference values to the current @@ -64,7 +64,7 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { #[inline] fn to_arrow<'a>( data: impl IntoIterator>>, - ) -> SerializationResult + ) -> SerializationResult where Self: 'a, { @@ -93,7 +93,7 @@ pub trait Loggable: 'static + Send + Sync + Clone + Sized + SizeBytes { /// Given an Arrow array, deserializes it into a collection of [`Loggable`]s. #[inline] - fn from_arrow(data: &arrow::array::ArrayData) -> DeserializationResult> { + fn from_arrow(data: &dyn arrow::array::Array) -> DeserializationResult> { re_tracing::profile_function!(); Self::from_arrow_opt(data)? .into_iter() @@ -120,8 +120,9 @@ 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(data: &arrow::array::ArrayData) -> DeserializationResult>> { - Self::from_arrow2_opt(arrow2::array::from_data(data).as_ref()) + fn from_arrow_opt(data: &dyn arrow::array::Array) -> DeserializationResult>> { + let boxed_arrow2_array: Box = data.into(); + Self::from_arrow2_opt(boxed_arrow2_array.as_ref()) } /// Given an Arrow2 array, deserializes it into a collection of optional [`Loggable`]s. From 53571fd28325df8d9199c59bd04764dd25f2413a Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 22 Nov 2024 19:30:11 +0100 Subject: [PATCH 4/4] Add both ArrowError and Arrow2Error to SerializationError --- crates/store/re_types_core/src/result.rs | 57 +++++++++++++++++++++--- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/crates/store/re_types_core/src/result.rs b/crates/store/re_types_core/src/result.rs index 181c600532bd..f03967072bfd 100644 --- a/crates/store/re_types_core/src/result.rs +++ b/crates/store/re_types_core/src/result.rs @@ -32,6 +32,10 @@ pub enum SerializationError { /// E.g. too many values (overflows i32). #[error(transparent)] ArrowError(#[from] ArcArrowError), + + /// E.g. too many values (overflows i32). + #[error(transparent)] + Arrow2Error(#[from] ArcArrow2Error), } impl std::fmt::Debug for SerializationError { @@ -75,20 +79,59 @@ impl SerializationError { match self { Self::MissingExtensionMetadata { backtrace, .. } | Self::NotImplemented { backtrace, .. } => Some(backtrace.clone()), - Self::ArrowError { .. } | Self::Context { .. } => None, + Self::ArrowError { .. } | Self::Arrow2Error { .. } | Self::Context { .. } => None, } } } +// ---------------------------------------------------------------------------- + +/// A cloneable wrapper around [`arrow::error::ArrowError`], for easier use. +/// +/// The motivation behind this type is that we often use code that can return a `arrow2::error::Error` +/// inside functions that return a `SerializationError`. By wrapping it we can use the ? operator and simplify the code. +/// Second, normally also [`arrow::error::ArrowError`] isn't cloneable, but `SerializationError` is. +#[derive(Clone, Debug)] +pub struct ArcArrowError(std::sync::Arc); + +impl From for ArcArrowError { + fn from(e: arrow::error::ArrowError) -> Self { + Self(std::sync::Arc::new(e)) + } +} + +impl From for SerializationError { + fn from(e: arrow::error::ArrowError) -> Self { + Self::ArrowError(ArcArrowError::from(e)) + } +} + +impl Deref for ArcArrowError { + type Target = arrow::error::ArrowError; + + #[inline] + fn deref(&self) -> &Self::Target { + self.0.as_ref() + } +} + +impl Display for ArcArrowError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + self.0.fmt(f) + } +} + +// ---------------------------------------------------------------------------- + /// A cloneable wrapper around `arrow2::error::Error`, for easier use. /// /// The motivation behind this type is that we often use code that can return a `arrow2::error::Error` /// inside functions that return a `SerializationError`. By wrapping it we can use the ? operator and simplify the code. /// Second, normally also `arrow2::error::Error` isn't cloneable, but `SerializationError` is. #[derive(Clone, Debug)] -pub struct ArcArrowError(std::sync::Arc); +pub struct ArcArrow2Error(std::sync::Arc); -impl From for ArcArrowError { +impl From for ArcArrow2Error { fn from(e: arrow2::error::Error) -> Self { Self(std::sync::Arc::new(e)) } @@ -96,11 +139,11 @@ impl From for ArcArrowError { impl From for SerializationError { fn from(e: arrow2::error::Error) -> Self { - Self::ArrowError(ArcArrowError::from(e)) + Self::Arrow2Error(ArcArrow2Error::from(e)) } } -impl Deref for ArcArrowError { +impl Deref for ArcArrow2Error { type Target = arrow2::error::Error; #[inline] @@ -109,12 +152,14 @@ impl Deref for ArcArrowError { } } -impl Display for ArcArrowError { +impl Display for ArcArrow2Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.fmt(f) } } +// ---------------------------------------------------------------------------- + pub type SerializationResult = ::std::result::Result; // ---