crepererum commented on code in PR #5306:
URL: https://github.com/apache/arrow-rs/pull/5306#discussion_r1455556689
##########
arrow-avro/src/reader/mod.rs:
##########
@@ -73,19 +73,34 @@ fn read_blocks<R: BufRead>(mut reader: R) -> impl
Iterator<Item = Result<Block,
#[cfg(test)]
mod test {
+ use crate::compression::CompressionCodec;
use crate::reader::{read_blocks, read_header};
use crate::test_util::arrow_test_data;
use std::fs::File;
use std::io::BufReader;
#[test]
fn test_mux() {
- let file =
File::open(arrow_test_data("avro/alltypes_plain.avro")).unwrap();
- let mut reader = BufReader::new(file);
- let header = read_header(&mut reader).unwrap();
- for result in read_blocks(reader) {
- let block = result.unwrap();
- assert_eq!(block.sync, header.sync());
+ let files = [
+ "avro/alltypes_plain.avro",
+ "avro/alltypes_plain.snappy.avro",
+ "avro/alltypes_plain.zstandard.avro",
+ "avro/alltypes_nulls_plain.avro",
+ ];
+
+ for file in files {
+ let file = File::open(arrow_test_data(file)).unwrap();
+ let mut reader = BufReader::new(file);
+ let header = read_header(&mut reader).unwrap();
+ let compression = header.compression().unwrap();
+ println!("{compression:?}");
Review Comment:
```suggestion
for file in files {
println!("file: {file}");
let file = File::open(arrow_test_data(file)).unwrap();
let mut reader = BufReader::new(file);
let header = read_header(&mut reader).unwrap();
let compression = header.compression().unwrap();
println!("compression: {compression:?}");
```
makes debugging of failed tests slightly easier
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]