Skip to content

Commit

Permalink
refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
goldmedal authored and alamb committed Oct 10, 2024
1 parent c052147 commit 3c2e694
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions parquet/src/arrow/arrow_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3130,9 +3130,7 @@ mod tests {
assert_eq!(
batch
.column(0)
.as_any()
.downcast_ref::<StringArray>()
.expect("downcast to string")
.as_string::<i32>()
.iter()
.collect::<Vec<_>>(),
vec![Some("one"), Some("two"), Some("three")]
Expand All @@ -3141,22 +3139,14 @@ mod tests {
assert_eq!(
batch
.column(1)
.as_any()
.downcast_ref::<LargeStringArray>()
.expect("downcast to large string")
.as_string::<i64>()
.iter()
.collect::<Vec<_>>(),
vec![Some("one"), Some("two"), Some("three")]
);

assert_eq!(
batch
.column(2)
.as_any()
.downcast_ref::<StringViewArray>()
.expect("downcast to string view")
.iter()
.collect::<Vec<_>>(),
batch.column(2).as_string_view().iter().collect::<Vec<_>>(),
vec![Some("one"), Some("two"), Some("three")]
);
}
Expand Down Expand Up @@ -3186,8 +3176,7 @@ mod tests {
.expect("reader builder with schema")
.build()
.expect("reader with schema");

arrow_reader.next();
arrow_reader.next().unwrap().unwrap_err();
}

#[test]
Expand Down

0 comments on commit 3c2e694

Please sign in to comment.