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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
b41sh committed Jan 8, 2024
1 parent 7751abe commit 4e99b57
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/io/orc/read/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ fn infer_dt(type_: &Type, types: &[Type]) -> Result<DataType, Error> {
}

fn deserialize_validity(column: &Column, scratch: &mut Vec<u8>) -> Result<Option<Bitmap>, Error> {
let stream = column.get_stream(Kind::Present, std::mem::take(scratch))?;
let stream = match column.get_stream(Kind::Present, std::mem::take(scratch)) {
Ok(stream) => stream,
Err(_) => {
return Ok(None);
}
};

let mut stream = decode::BooleanIter::new(stream, column.number_of_rows());

Expand Down Expand Up @@ -351,3 +356,4 @@ pub fn deserialize(data_type: DataType, column: &Column) -> Result<Box<dyn Array
dt => Err(Error::nyi(format!("Deserializing {dt:?} from ORC"))),
}
}

0 comments on commit 4e99b57

Please sign in to comment.