Skip to content

Commit

Permalink
WIPrust
Browse files Browse the repository at this point in the history
  • Loading branch information
douglas-raillard-arm committed Jan 16, 2024
1 parent 7a0d5b0 commit a8bcc06
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/trace-parser/trace-tools/src/lib/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub enum MainError {
#[error("Arrow error: {0}")]
ArrowError(ArrowError),

#[error("Field type not handled: {0:?}")]
#[error("Type not handled in field: {0:?}")]
TypeNotHandled(Box<Type>),

#[error("Arrow data type not handled: {0:?}")]
Expand Down Expand Up @@ -1093,6 +1093,7 @@ where

let field_cols = fields.into_iter().map(|(name, typ)| {
fn guess_typ(typ: &Type, char_typ: &Type, long_size: &LongSize) -> Result<DataType, MainError> {
let recurse = |typ| guess_typ(typ, char_typ, long_size);
match typ {
Type::Bool => Ok(DataType::Boolean),
Type::U8 => Ok(DataType::UInt8),
Expand All @@ -1115,7 +1116,7 @@ where
Type::Bool | Type::U8 | Type::I8 | Type::U16 | Type::I16 | Type::U32 | Type::I32 | Type::U64 | Type::I64
) => Ok(DataType::List(Box::new(Field::new(
"",
guess_typ(inner, char_typ, long_size)?,
recurse(inner)?,
true,
)))),

Expand Down

0 comments on commit a8bcc06

Please sign in to comment.