This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added read of 2-level nested lists from parquet (#548)
- Loading branch information
1 parent
788f382
commit 4491954
Showing
11 changed files
with
286 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mod basic; | ||
mod dictionary; | ||
mod nested; | ||
mod utils; | ||
|
||
pub use basic::iter_to_array; | ||
pub use basic::stream_to_array; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use crate::{ | ||
array::{Array, BinaryArray, Offset, Utf8Array}, | ||
bitmap::MutableBitmap, | ||
buffer::MutableBuffer, | ||
datatypes::DataType, | ||
}; | ||
|
||
pub(super) fn finish_array<O: Offset>( | ||
data_type: DataType, | ||
offsets: MutableBuffer<O>, | ||
values: MutableBuffer<u8>, | ||
validity: MutableBitmap, | ||
) -> Box<dyn Array> { | ||
match data_type { | ||
DataType::LargeBinary | DataType::Binary => Box::new(BinaryArray::from_data( | ||
data_type, | ||
offsets.into(), | ||
values.into(), | ||
validity.into(), | ||
)), | ||
DataType::LargeUtf8 | DataType::Utf8 => Box::new(Utf8Array::from_data( | ||
data_type, | ||
offsets.into(), | ||
values.into(), | ||
validity.into(), | ||
)), | ||
_ => unreachable!(), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.