diff --git a/crates/re_types/source_hash.txt b/crates/re_types/source_hash.txt index e864f2d1d95f..672833d20e43 100644 --- a/crates/re_types/source_hash.txt +++ b/crates/re_types/source_hash.txt @@ -1,4 +1,4 @@ # This is a sha256 hash for all direct and indirect dependencies of this crate's build script. # It can be safely removed at anytime to force the build script to run again. # Check out build.rs to see how it's computed. -e45f620a5a7e37189161bd67ebaa7b111fa0569a315fb28bd960dd0e564b1149 +9c75fa33055b75b1c29e08cddae47be88c686d3a20a97bcd584dfa664bc1c479 diff --git a/crates/re_types/src/components/fuzzy.rs b/crates/re_types/src/components/fuzzy.rs index 97c5fde3caaf..8186f5d9563f 100644 --- a/crates/re_types/src/components/fuzzy.rs +++ b/crates/re_types/src/components/fuzzy.rs @@ -102,12 +102,7 @@ impl crate::Loggable for AffixFuzzer1 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -276,12 +271,7 @@ impl crate::Loggable for AffixFuzzer2 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -452,12 +442,7 @@ impl crate::Loggable for AffixFuzzer3 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -628,12 +613,7 @@ impl crate::Loggable for AffixFuzzer4 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -800,12 +780,7 @@ impl crate::Loggable for AffixFuzzer5 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -974,12 +949,7 @@ impl crate::Loggable for AffixFuzzer6 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -1090,82 +1060,7 @@ impl crate::Loggable for AffixFuzzer7 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -1223,82 +1118,7 @@ impl crate::Loggable for AffixFuzzer7 { "rerun.testing.components.AffixFuzzer7".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }))), @@ -2469,82 +2289,7 @@ impl crate::Loggable for AffixFuzzer14 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -2701,82 +2446,7 @@ impl crate::Loggable for AffixFuzzer15 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -2909,130 +2579,7 @@ impl crate::Loggable for AffixFuzzer16 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })) @@ -3090,136 +2637,7 @@ impl crate::Loggable for AffixFuzzer16 { "rerun.testing.components.AffixFuzzer16".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - )), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - )), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - )), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }))), @@ -3356,130 +2774,7 @@ impl crate::Loggable for AffixFuzzer17 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -3539,136 +2834,7 @@ impl crate::Loggable for AffixFuzzer17 { "rerun.testing.components.AffixFuzzer17".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - )), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - )), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new( - Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - )), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }))), @@ -3801,415 +2967,7 @@ impl crate::Loggable for AffixFuzzer18 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_required".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -4262,145 +3020,34 @@ impl crate::Loggable for AffixFuzzer18 { ) .unwrap() .into(); - ListArray :: new ({ _ = extension_wrapper ; DataType :: Extension ("rerun.testing.components.AffixFuzzer18" . to_owned () , Box :: new (DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Union (vec ! [Field { name : "_null_markers" . to_owned () , data_type : DataType :: Null , is_nullable : true , metadata : [] . into () , } - - , Field { name : "single_required" . to_owned () , data_type : DataType :: Union (vec ! [Field { name : "_null_markers" . to_owned () , data_type : DataType :: Null , is_nullable : true , metadata : [] . into () , } - - , Field { name : "degrees" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "radians" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "craziness" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "single_float_optional" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "single_string_required" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "single_string_optional" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_floats_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_strings_required" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "many_strings_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "flattened_scalar" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "almost_flattened_scalar" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "value" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "from_parent" . to_owned () , data_type : DataType :: Boolean , is_nullable : true , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "fixed_size_shenanigans" . to_owned () , data_type : DataType :: FixedSizeList (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - -) , 3usize) , is_nullable : false , metadata : [] . into () , } - - ,] , Some (vec ! [0i32 , 1i32 , 2i32 , 3i32 , 4i32 ,]) , UnionMode :: Dense) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "many_required" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Union (vec ! [Field { name : "_null_markers" . to_owned () , data_type : DataType :: Null , is_nullable : true , metadata : [] . into () , } - - , Field { name : "degrees" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "radians" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "craziness" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "single_float_optional" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "single_string_required" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "single_string_optional" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_floats_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_strings_required" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "many_strings_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "flattened_scalar" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "almost_flattened_scalar" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "value" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "from_parent" . to_owned () , data_type : DataType :: Boolean , is_nullable : true , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "fixed_size_shenanigans" . to_owned () , data_type : DataType :: FixedSizeList (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - -) , 3usize) , is_nullable : false , metadata : [] . into () , } - - ,] , Some (vec ! [0i32 , 1i32 , 2i32 , 3i32 , 4i32 ,]) , UnionMode :: Dense) , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "many_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Union (vec ! [Field { name : "_null_markers" . to_owned () , data_type : DataType :: Null , is_nullable : true , metadata : [] . into () , } - - , Field { name : "degrees" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "radians" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "craziness" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "single_float_optional" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "single_string_required" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "single_string_optional" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_floats_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "many_strings_required" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "many_strings_optional" . to_owned () , data_type : DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Utf8 , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : true , metadata : [] . into () , } - - , Field { name : "flattened_scalar" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - , Field { name : "almost_flattened_scalar" . to_owned () , data_type : DataType :: Struct (vec ! [Field { name : "value" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "from_parent" . to_owned () , data_type : DataType :: Boolean , is_nullable : true , metadata : [] . into () , } - - ,]) , is_nullable : false , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - , Field { name : "fixed_size_shenanigans" . to_owned () , data_type : DataType :: FixedSizeList (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } - -) , 3usize) , is_nullable : false , metadata : [] . into () , } - - ,] , Some (vec ! [0i32 , 1i32 , 2i32 , 3i32 , 4i32 ,]) , UnionMode :: Dense) , is_nullable : true , metadata : [] . into () , } - -)) , is_nullable : false , metadata : [] . into () , } - - ,] , Some (vec ! [0i32 , 1i32 , 2i32 , 3i32 ,]) , UnionMode :: Dense) , is_nullable : true , metadata : [] . into () , } - -))) , None) . to_logical_type () . clone () } - - , offsets , { _ = many_optional_unions_inner_bitmap ; _ = extension_wrapper ; crate :: datatypes :: AffixFuzzer4 :: try_to_arrow_opt (many_optional_unions_inner_data , Some ("rerun.testing.components.AffixFuzzer18")) ? } - - , many_optional_unions_bitmap ,) . boxed () + ListArray::new( + { + _ = extension_wrapper; + DataType::Extension( + "rerun.testing.components.AffixFuzzer18".to_owned(), + Box::new(DataType::List(Box::new(Field { + name: "item".to_owned(), + data_type: ::to_arrow_datatype(), + is_nullable: true, + metadata: [].into(), + }))), + None, + ) + .to_logical_type() + .clone() + }, + offsets, + { + _ = many_optional_unions_inner_bitmap; + _ = extension_wrapper; + crate::datatypes::AffixFuzzer4::try_to_arrow_opt( + many_optional_unions_inner_data, + Some("rerun.testing.components.AffixFuzzer18"), + )? + }, + many_optional_unions_bitmap, + ) + .boxed() } }) } @@ -4513,415 +3160,7 @@ impl crate::Loggable for AffixFuzzer19 { use ::arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_required".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }]) diff --git a/crates/re_types/src/components/transform3d.rs b/crates/re_types/src/components/transform3d.rs index 0a01b221e049..c7d4fde1f782 100644 --- a/crates/re_types/src/components/transform3d.rs +++ b/crates/re_types/src/components/transform3d.rs @@ -54,187 +54,13 @@ impl crate::Loggable for Transform3D { }, Field { name: "TranslationAndMat3x3".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "matrix".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 9usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: false, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, Field { name: "TranslationRotationScale".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "rotation".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Quaternion".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 4usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "AxisAngle".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "axis".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "angle".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "scale".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "ThreeD".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Uniform".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: false, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/fuzzy.rs b/crates/re_types/src/datatypes/fuzzy.rs index f58e36748116..b16432258c6a 100644 --- a/crates/re_types/src/datatypes/fuzzy.rs +++ b/crates/re_types/src/datatypes/fuzzy.rs @@ -287,12 +287,7 @@ impl crate::Loggable for AffixFuzzer1 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -1156,82 +1151,7 @@ impl crate::Loggable for AffixFuzzer3 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -1397,82 +1317,8 @@ impl crate::Loggable for AffixFuzzer3 { _ = extension_wrapper; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), + data_type: + ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })) @@ -1769,130 +1615,7 @@ impl crate::Loggable for AffixFuzzer4 { }, Field { name: "single_required".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -1900,130 +1623,7 @@ impl crate::Loggable for AffixFuzzer4 { name: "many_required".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -2034,130 +1634,7 @@ impl crate::Loggable for AffixFuzzer4 { name: "many_optional".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })), @@ -2278,147 +1755,8 @@ impl crate::Loggable for AffixFuzzer4 { _ = extension_wrapper; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional" - .to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required" - .to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional" - .to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: - DataType::Float32, - is_nullable: true, - metadata: [].into(), - }), - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }), - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }), - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar" - .to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "value".to_owned(), - data_type: - DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: + ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })) @@ -2480,147 +1818,8 @@ impl crate::Loggable for AffixFuzzer4 { _ = extension_wrapper; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional" - .to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required" - .to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional" - .to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: - DataType::Float32, - is_nullable: true, - metadata: [].into(), - }), - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }), - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional" - .to_owned(), - data_type: DataType::List( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }), - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar" - .to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "value".to_owned(), - data_type: - DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), + data_type: + ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -2824,415 +2023,7 @@ impl crate::Loggable for AffixFuzzer5 { use ::arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_required".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "craziness".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "single_float_optional".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "single_string_required".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "single_string_optional".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_floats_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "many_strings_required".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "many_strings_optional".to_owned(), - data_type: DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Utf8, - is_nullable: true, - metadata: [].into(), - })), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "flattened_scalar".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "almost_flattened_scalar".to_owned(), - data_type: DataType::Struct(vec![Field { - name: "value".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }]), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: true, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "fixed_size_shenanigans".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32, 4i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - })), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32, 3i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }]) diff --git a/crates/re_types/src/datatypes/rotation3d.rs b/crates/re_types/src/datatypes/rotation3d.rs index 881d06d0af2f..8debaf33fb89 100644 --- a/crates/re_types/src/datatypes/rotation3d.rs +++ b/crates/re_types/src/datatypes/rotation3d.rs @@ -57,65 +57,13 @@ impl crate::Loggable for Rotation3D { }, Field { name: "Quaternion".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 4usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, Field { name: "AxisAngle".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "axis".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "angle".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/rotation_axis_angle.rs b/crates/re_types/src/datatypes/rotation_axis_angle.rs index 0ede87fc2cb7..eec8e412ac4f 100644 --- a/crates/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/re_types/src/datatypes/rotation_axis_angle.rs @@ -54,44 +54,13 @@ impl crate::Loggable for RotationAxisAngle { DataType::Struct(vec![ Field { name: "axis".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, Field { name: "angle".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/scale3d.rs b/crates/re_types/src/datatypes/scale3d.rs index 3695640af5cb..2017cd2161ce 100644 --- a/crates/re_types/src/datatypes/scale3d.rs +++ b/crates/re_types/src/datatypes/scale3d.rs @@ -57,15 +57,7 @@ impl crate::Loggable for Scale3D { }, Field { name: "ThreeD".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/transform3d.rs b/crates/re_types/src/datatypes/transform3d.rs index 4abf9bd8815a..a00ea0fa3746 100644 --- a/crates/re_types/src/datatypes/transform3d.rs +++ b/crates/re_types/src/datatypes/transform3d.rs @@ -57,187 +57,13 @@ impl crate::Loggable for Transform3D { }, Field { name: "TranslationAndMat3x3".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "matrix".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 9usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: false, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, Field { name: "TranslationRotationScale".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "rotation".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Quaternion".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 4usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "AxisAngle".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "axis".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "angle".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "scale".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "ThreeD".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Uniform".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "from_parent".to_owned(), - data_type: DataType::Boolean, - is_nullable: false, - metadata: [].into(), - }, - ]), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/translation_and_mat3x3.rs b/crates/re_types/src/datatypes/translation_and_mat3x3.rs index 8de72fe2fe0f..696e7d4437bf 100644 --- a/crates/re_types/src/datatypes/translation_and_mat3x3.rs +++ b/crates/re_types/src/datatypes/translation_and_mat3x3.rs @@ -56,29 +56,13 @@ impl crate::Loggable for TranslationAndMat3x3 { DataType::Struct(vec![ Field { name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }, Field { name: "matrix".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 9usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }, diff --git a/crates/re_types/src/datatypes/translation_rotation_scale3d.rs b/crates/re_types/src/datatypes/translation_rotation_scale3d.rs index 5d1310583b07..ed7e4230b05a 100644 --- a/crates/re_types/src/datatypes/translation_rotation_scale3d.rs +++ b/crates/re_types/src/datatypes/translation_rotation_scale3d.rs @@ -59,133 +59,19 @@ impl crate::Loggable for TranslationRotationScale3D { DataType::Struct(vec![ Field { name: "translation".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }, Field { name: "rotation".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Quaternion".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 4usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "AxisAngle".to_owned(), - data_type: DataType::Struct(vec![ - Field { - name: "axis".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "angle".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "Radians".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Degrees".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), - is_nullable: false, - metadata: [].into(), - }, - ]), - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }, Field { name: "scale".to_owned(), - data_type: DataType::Union( - vec![ - Field { - name: "_null_markers".to_owned(), - data_type: DataType::Null, - is_nullable: true, - metadata: [].into(), - }, - Field { - name: "ThreeD".to_owned(), - data_type: DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ), - is_nullable: false, - metadata: [].into(), - }, - Field { - name: "Uniform".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }, - ], - Some(vec![0i32, 1i32, 2i32]), - UnionMode::Dense, - ), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }, diff --git a/crates/re_types_builder/src/codegen/rust.rs b/crates/re_types_builder/src/codegen/rust.rs index 960835e255f3..f9647ece7faa 100644 --- a/crates/re_types_builder/src/codegen/rust.rs +++ b/crates/re_types_builder/src/codegen/rust.rs @@ -667,7 +667,7 @@ fn quote_trait_impls_from_obj( let kind_name = format_ident!("{kind}Name"); let datatype = arrow_registry.get(fqname); - let datatype = ArrowDataTypeTokenizer(&datatype); + let datatype = ArrowDataTypeTokenizer(&datatype, false); let legacy_fqname = obj .try_get_attr::(ATTR_RERUN_LEGACY_FQNAME) @@ -1102,13 +1102,14 @@ fn quote_builder_from_obj(obj: &Object) -> TokenStream { // --- Arrow registry code generators --- -struct ArrowDataTypeTokenizer<'a>(&'a ::arrow2::datatypes::DataType); +/// `(Datatype, is_recursive)` +struct ArrowDataTypeTokenizer<'a>(&'a ::arrow2::datatypes::DataType, bool); impl quote::ToTokens for ArrowDataTypeTokenizer<'_> { fn to_tokens(&self, tokens: &mut TokenStream) { use arrow2::datatypes::UnionMode; - // TODO(cmc): Bring back extensions once we've fully replaced `arrow2-convert`! - match self.0.to_logical_type() { + let Self(datatype, recursive) = self; + match datatype { DataType::Null => quote!(DataType::Null), DataType::Boolean => quote!(DataType::Boolean), DataType::Int8 => quote!(DataType::Int8), @@ -1155,10 +1156,18 @@ impl quote::ToTokens for ArrowDataTypeTokenizer<'_> { quote!(DataType::Struct(vec![ #(#fields,)* ])) } - DataType::Extension(name, datatype, metadata) => { - let datatype = ArrowDataTypeTokenizer(datatype); - let metadata = OptionTokenizer(metadata.as_ref()); - quote!(DataType::Extension(#name.to_owned(), Box::new(#datatype), #metadata)) + DataType::Extension(fqname, datatype, _metadata) => { + if *recursive { + let fqname_use = quote_fqname_as_type_path(fqname); + quote!(<#fqname_use>::to_arrow_datatype()) + } else { + let datatype = ArrowDataTypeTokenizer(datatype.to_logical_type(), false); + quote!(#datatype) + // TODO(cmc): Bring back extensions once we've fully replaced `arrow2-convert`! + // let datatype = ArrowDataTypeTokenizer(datatype, false); + // let metadata = OptionTokenizer(metadata.as_ref()); + // quote!(DataType::Extension(#fqname.to_owned(), Box::new(#datatype), #metadata)) + } } _ => unimplemented!("{:#?}", self.0), @@ -1178,7 +1187,7 @@ impl quote::ToTokens for ArrowFieldTokenizer<'_> { metadata, } = &self.0; - let datatype = ArrowDataTypeTokenizer(data_type); + let datatype = ArrowDataTypeTokenizer(data_type, true); let metadata = StrStrMapTokenizer(metadata); quote! { @@ -1535,7 +1544,7 @@ fn quote_arrow_field_serializer( bitmap_src: &proc_macro2::Ident, data_src: &proc_macro2::Ident, ) -> TokenStream { - let quoted_datatype = ArrowDataTypeTokenizer(datatype); + let quoted_datatype = ArrowDataTypeTokenizer(datatype, false); let quoted_datatype = if let Some(ext) = extension_wrapper { quote!(DataType::Extension(#ext.to_owned(), Box::new(#quoted_datatype), None)) } else {