Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
John Hughes committed Dec 17, 2022
1 parent 6793934 commit 739dfeb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/it/array/growable/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use arrow2::{
growable::{Growable, GrowableList},
Array, ListArray, MutableListArray, MutablePrimitiveArray, TryExtend,
},
datatypes::{self, DataType},
datatypes::DataType,
};

fn create_list_array(data: Vec<Option<Vec<Option<i32>>>>) -> ListArray<i32> {
Expand All @@ -24,7 +24,7 @@ fn extension() {

let data_type =
DataType::Extension("ext".to_owned(), Box::new(array.data_type().clone()), None);
let array_ext = ListArray::from_data(
let array_ext = ListArray::new(
data_type,
array.offsets().clone(),
array.values().clone(),
Expand Down
8 changes: 5 additions & 3 deletions tests/it/compute/concatenate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ fn list_of_extensions_of_struct() {
"a",
DataType::Extension(
"ext".to_owned(),
Box::new(
DataType::Struct(vec![Field::new( "a", DataType::Int16, false,)])
),
Box::new(DataType::Struct(vec![Field::new(
"a",
DataType::Int16,
false,
)])),
None,
),
true,
Expand Down
2 changes: 1 addition & 1 deletion tests/it/ffi/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,6 @@ fn extension_struct() -> Result<()> {
let values = vec![Int32Array::from([Some(1), None, Some(3)]).boxed()];
let validity = Bitmap::from([true, false, true]);

let array = StructArray::from_data(data_type, values, validity.into());
let array = StructArray::new(data_type, values, validity.into());
test_round_trip(array)
}

0 comments on commit 739dfeb

Please sign in to comment.