Skip to content

Commit

Permalink
Add panic if filtered returns non P or M
Browse files Browse the repository at this point in the history
  • Loading branch information
OussamaSaoudi-db committed Sep 23, 2024
1 parent 7842372 commit c71ec9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/src/engine/default/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ mod tests {
for batch in data_filtered.into_iter().map(Into::<ArrowEngineData>::into) {
if let Some(metadata) = Metadata::try_new_from_data(&batch).unwrap() {
metadata_filtered.push(metadata);
}
if let Some(protocol) = Protocol::try_new_from_data(&batch).unwrap() {
} else if let Some(protocol) = Protocol::try_new_from_data(&batch).unwrap() {
protocol_filtered.push(protocol);
} else {
panic!("The filtered data must only have metadata or protocol entries");
}
}
for batch in data.into_iter().map(Into::<ArrowEngineData>::into) {
Expand Down

0 comments on commit c71ec9d

Please sign in to comment.