From 53cd5f86464449d3151fb09ea259ed0d9e6fc794 Mon Sep 17 00:00:00 2001 From: melkor Date: Sun, 8 Sep 2024 15:33:10 -0700 Subject: [PATCH] [WIP] Work around arrow-rs bug https://github.com/apache/arrow-rs/issues/6311 --- src/io/peppi/de.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/io/peppi/de.rs b/src/io/peppi/de.rs index 7dccaf8..e0b74ed 100644 --- a/src/io/peppi/de.rs +++ b/src/io/peppi/de.rs @@ -23,7 +23,18 @@ pub struct Opts { fn read_arrow_frames(mut r: R, version: slippi::Version) -> Result { // magic number `ARROW1\0\0` - expect_bytes(&mut r, &[65, 82, 82, 79, 87, 49, 0, 0])?; + //expect_bytes(&mut r, &[65, 82, 82, 79, 87, 49, 0, 0])?; + // temp hack to work around https://github.com/apache/arrow-rs/issues/6311 + expect_bytes(&mut r, &[ + 65, 82, 82, 79, 87, 49, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + ])?; let mut reader = StreamReader::try_new(r, None)?; let batch = reader.next().ok_or(err!("no batches"))??; let frames = StructArray::from(batch);