Skip to content

Commit

Permalink
Add a test for ARROW-GH-45185.parquet
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jan 15, 2025
1 parent a3a8f97 commit b52845e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions parquet/tests/arrow_reader/bad_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
];

Expand Down Expand Up @@ -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<usize, ParquetError> {
Expand Down

0 comments on commit b52845e

Please sign in to comment.