Skip to content

Commit

Permalink
Update to arrow2 0.17 + bump up version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpenke committed May 9, 2023
1 parent acb5f67 commit d325889
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions arrow2_convert/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arrow2_convert"
version = "0.4.2"
version = "0.5.0"
authors = [
"Jorge Leitao <jorgecarleitao@gmail.com>",
"Chandra Penke <chandrapenke@gmail.com>",
Expand All @@ -12,13 +12,13 @@ repository = "https://github.com/DataEngineeringLabs/arrow2-convert"
description = "Convert between nested rust types and Arrow with arrow2"

[dependencies]
arrow2 = "0.16"
arrow2_convert_derive = { version = "0.4.2", path = "../arrow2_convert_derive", optional = true }
arrow2 = "0.17"
arrow2_convert_derive = { version = "0.5.0", path = "../arrow2_convert_derive", optional = true }
chrono = { version = "0.4", default_features = false, features = ["std"] }
err-derive = "0.3"

[dev-dependencies]
arrow2_convert_derive = { version = "0.4.2", path = "../arrow2_convert_derive" }
arrow2_convert_derive = { version = "0.5.0", path = "../arrow2_convert_derive" }
criterion = "0.4"
trybuild = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion arrow2_convert/src/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a> Iterator for BufferBinaryArrayIter<'a> {
}
let (start, end) = self.array.offsets().start_end(self.index);
self.index += 1;
Some(Some(self.array.values().clone().slice(start, end - start)))
Some(Some(self.array.values().clone().sliced(start, end - start)))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion arrow2_convert/tests/test_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ fn test_slice() {
let b: Box<dyn Array> = enums.try_into_arrow().unwrap();

for i in 0..enums.len() {
let arrow_slice = b.slice(i, enums.len() - i);
let arrow_slice = b.sliced(i, enums.len() - i);
let original_slice = &enums[i..enums.len()];
let round_trip: Vec<TestEnum> = arrow_slice.try_into_collection().unwrap();
assert_eq!(round_trip, original_slice);
Expand Down
4 changes: 2 additions & 2 deletions arrow2_convert/tests/test_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn test_slice() {
let b: Box<dyn Array> = original.try_into_arrow().unwrap();

for i in 0..original.len() {
let arrow_slice = b.slice(i, original.len() - i);
let arrow_slice = b.sliced(i, original.len() - i);
let original_slice = &original[i..original.len()];
let round_trip: Vec<T> = arrow_slice.try_into_collection().unwrap();
assert_eq!(round_trip, original_slice);
Expand Down Expand Up @@ -84,7 +84,7 @@ fn test_nested_slice() {
let b: Box<dyn Array> = original.try_into_arrow().unwrap();

for i in 0..original.len() {
let arrow_slice = b.slice(i, original.len() - i);
let arrow_slice = b.sliced(i, original.len() - i);
let original_slice = &original[i..original.len()];
let round_trip: Vec<Top> = arrow_slice.try_into_collection().unwrap();
assert_eq!(round_trip, original_slice);
Expand Down
2 changes: 1 addition & 1 deletion arrow2_convert_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arrow2_convert_derive"
version = "0.4.2"
version = "0.5.0"
authors = [
"Jorge Leitao <jorgecarleitao@gmail.com>",
"Chandra Penke <chandrapenke@gmail.com>"
Expand Down
2 changes: 1 addition & 1 deletion arrow2_convert_derive/src/derive_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ pub fn expand_deserialize(input: DeriveEnum) -> TokenStream {
return None;
};
let (type_idx, offset) = self.arr.index(next_index);
let slice = self.arr.fields()[type_idx].slice(offset, 1);
let slice = self.arr.fields()[type_idx].sliced(offset, 1);
match type_idx {
#iter_next_match_block
_ => panic!("Invalid type for {}", #original_name_str)
Expand Down
4 changes: 2 additions & 2 deletions examples/simple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.16"
arrow2_convert = { version = "0.4.2", path = "../../arrow2_convert" }
arrow2 = "0.17"
arrow2_convert = { version = "0.5", path = "../../arrow2_convert" }

0 comments on commit d325889

Please sign in to comment.