From b52845e3798d22b15d90357c687e3281fc0e99fc Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 15 Jan 2025 05:48:37 -0500 Subject: [PATCH] Add a test for ARROW-GH-45185.parquet --- parquet/tests/arrow_reader/bad_data.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/parquet/tests/arrow_reader/bad_data.rs b/parquet/tests/arrow_reader/bad_data.rs index cfd61e82d32b..7de5d7e346d6 100644 --- a/parquet/tests/arrow_reader/bad_data.rs +++ b/parquet/tests/arrow_reader/bad_data.rs @@ -30,6 +30,7 @@ static KNOWN_FILES: &[&str] = &[ "ARROW-GH-43605.parquet", "ARROW-RS-GH-6229-DICTHEADER.parquet", "ARROW-RS-GH-6229-LEVELS.parquet", + "ARROW-GH-45185.parquet", "README.md", ]; @@ -120,6 +121,16 @@ fn test_arrow_rs_gh_6229_dict_levels() { ); } +#[test] +#[cfg(feature = "snap")] +fn test_arrow_rs_gh_45185_dict_levels() { + let err = read_file("ARROW-GH-45185.parquet").unwrap_err(); + assert_eq!( + err.to_string(), + "External: Parquet argument error: Parquet error: first repetition level of batch must be 0" + ); +} + /// Reads the file and tries to return the total row count /// Returns an error if the file is invalid fn read_file(name: &str) -> Result {