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

Commit

Permalink
Added support parquet deserialize largelist and uint (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
b41sh committed May 5, 2022
1 parent 9a38663 commit 2d70fbf
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/io/parquet/read/deserialize/mod.rs
Expand Up @@ -152,6 +152,46 @@ where
|x: i64| x,
)
}
UInt8 => {
types.pop();
primitive::iter_to_arrays_nested(
columns.pop().unwrap(),
init.pop().unwrap(),
field.data_type().clone(),
chunk_size,
|x: i32| x as u8,
)
}
UInt16 => {
types.pop();
primitive::iter_to_arrays_nested(
columns.pop().unwrap(),
init.pop().unwrap(),
field.data_type().clone(),
chunk_size,
|x: i32| x as u16,
)
}
UInt32 => {
types.pop();
primitive::iter_to_arrays_nested(
columns.pop().unwrap(),
init.pop().unwrap(),
field.data_type().clone(),
chunk_size,
|x: i32| x as u32,
)
}
UInt64 => {
types.pop();
primitive::iter_to_arrays_nested(
columns.pop().unwrap(),
init.pop().unwrap(),
field.data_type().clone(),
chunk_size,
|x: i64| x as u64,
)
}
Float32 => {
types.pop();
primitive::iter_to_arrays_nested(
Expand Down Expand Up @@ -205,6 +245,21 @@ where
});
Box::new(iter) as _
}
LargeList(inner) => {
let iter = columns_to_iter_recursive(
vec![columns.pop().unwrap()],
types,
inner.as_ref().clone(),
init,
chunk_size,
)?;
let iter = iter.map(move |x| {
let (mut nested, array) = x?;
let array = create_list(field.data_type().clone(), &mut nested, array)?;
Ok((nested, array))
});
Box::new(iter) as _
}
Struct(fields) => {
let columns = fields
.iter()
Expand Down

0 comments on commit 2d70fbf

Please sign in to comment.