Skip to content

Commit

Permalink
check schema and number of batches as well (per suggestion from @alamb)
Browse files Browse the repository at this point in the history
  • Loading branch information
etseidl committed Jan 17, 2025
1 parent 1ba1d96 commit d93d8f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions parquet/src/arrow/arrow_writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3430,7 +3430,13 @@ mod tests {

// read from parquet
let bytes = Bytes::from(parquet_bytes);
let result = ParquetRecordBatchReaderBuilder::try_new(bytes);
result.unwrap();
let reader = ParquetRecordBatchReaderBuilder::try_new(bytes).unwrap();
assert_eq!(reader.schema(), &empty_batch.schema());
let batches: Vec<_> = reader
.build()
.unwrap()
.collect::<ArrowResult<Vec<_>>>()
.unwrap();
assert_eq!(batches.len(), 0);
}
}

0 comments on commit d93d8f6

Please sign in to comment.