From dfa59faeafd6aa36e64d743f696c407061c6fb74 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Thu, 5 Jan 2023 03:32:52 +0100 Subject: [PATCH] Update `arrow2` to 0.15 (#89) --- arrow2_convert/Cargo.toml | 2 +- arrow2_convert_derive/src/derive_enum.rs | 4 ++-- arrow2_convert_derive/src/derive_struct.rs | 4 ++-- examples/simple/Cargo.toml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arrow2_convert/Cargo.toml b/arrow2_convert/Cargo.toml index 1eaa3c2..e148f70 100644 --- a/arrow2_convert/Cargo.toml +++ b/arrow2_convert/Cargo.toml @@ -12,7 +12,7 @@ repository = "https://github.com/DataEngineeringLabs/arrow2-convert" description = "Convert between nested rust types and Arrow with arrow2" [dependencies] -arrow2 = "0.14.1" +arrow2 = "0.15" arrow2_convert_derive = { version = "0.3.2", path = "../arrow2_convert_derive", optional = true } chrono = { version = "0.4", default_features = false, features = ["std"] } err-derive = "0.3" diff --git a/arrow2_convert_derive/src/derive_enum.rs b/arrow2_convert_derive/src/derive_enum.rs index d5779d4..cf96892 100644 --- a/arrow2_convert_derive/src/derive_enum.rs +++ b/arrow2_convert_derive/src/derive_enum.rs @@ -327,7 +327,7 @@ pub fn expand_serialize(input: DeriveEnum) -> TokenStream { <#mutable_variant_array_types as arrow2::array::MutableArray>::as_box(&mut self.#variant_names), )*]; - Box::new(arrow2::array::UnionArray::from_data( + Box::new(arrow2::array::UnionArray::new( <#original_name as arrow2_convert::field::ArrowField>::data_type().clone(), std::mem::take(&mut self.types).into(), values, @@ -340,7 +340,7 @@ pub fn expand_serialize(input: DeriveEnum) -> TokenStream { <#mutable_variant_array_types as arrow2::array::MutableArray>::as_box(&mut self.#variant_names), )*]; - std::sync::Arc::new(arrow2::array::UnionArray::from_data( + std::sync::Arc::new(arrow2::array::UnionArray::new( <#original_name as arrow2_convert::field::ArrowField>::data_type().clone(), std::mem::take(&mut self.types).into(), values, diff --git a/arrow2_convert_derive/src/derive_struct.rs b/arrow2_convert_derive/src/derive_struct.rs index 1e71b06..04e0e4d 100644 --- a/arrow2_convert_derive/src/derive_struct.rs +++ b/arrow2_convert_derive/src/derive_struct.rs @@ -217,7 +217,7 @@ pub fn expand_serialize(input: DeriveStruct) -> TokenStream { <#mutable_field_array_types as arrow2::array::MutableArray>::as_box(&mut self.#field_names), )*]; - Box::new(arrow2::array::StructArray::from_data( + Box::new(arrow2::array::StructArray::new( <#original_name as arrow2_convert::field::ArrowField>::data_type().clone(), values, std::mem::take(&mut self.validity).map(|x| x.into()), @@ -229,7 +229,7 @@ pub fn expand_serialize(input: DeriveStruct) -> TokenStream { <#mutable_field_array_types as arrow2::array::MutableArray>::as_box(&mut self.#field_names), )*]; - std::sync::Arc::new(arrow2::array::StructArray::from_data( + std::sync::Arc::new(arrow2::array::StructArray::new( <#original_name as arrow2_convert::field::ArrowField>::data_type().clone(), values, std::mem::take(&mut self.validity).map(|x| x.into()) diff --git a/examples/simple/Cargo.toml b/examples/simple/Cargo.toml index e529d7e..9b74e36 100644 --- a/examples/simple/Cargo.toml +++ b/examples/simple/Cargo.toml @@ -6,5 +6,5 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -arrow2 = "0.14" +arrow2 = "0.15" arrow2_convert = { version = "0.3", path = "../../arrow2_convert" }