jorgecarleitao / arrow2

Transmute-free Rust library to work with the Arrow format
Apache License 2.0
1.06k stars 221 forks source link

Compressed IPC Crash in certain cases #1591

Open Cambyst opened 1 year ago

Cambyst commented 1 year ago

Hi guys,

It seems the IPC decompression crashes with the particular attached example (it works fine if uncompressed). I have tried many variant but just cannot get my head around why it would fail (it loads fine in PyArrow). Many thanks in advance!

bigfile_3.dmp

use arrow2::io::ipc::read::{FileReader, read_file_metadata};
use std::fs::File;
let mut file = File::open("bigfile_3.arrow").expect("file not found");
let metadata = read_file_metadata(&mut file).unwrap();
let mut read = FileReader::new(file, metadata, None, None);
let mut parsed_df = read.next().unwrap().unwrap();

thread 'tokio-runtime-worker' panicked at 'range start index 8 out of range for slice of length 0', /arrow2-0.18.0/src/io/ipc/read/read_basic.rs:124:42

Cambyst commented 1 year ago

Updated initial question to use Arrow2 only