Skip to content

Commit 2438136

Browse files
committed
test(12123): update tests to pass now that latest arrow-rs release is in
1 parent 0d8f059 commit 2438136

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

datafusion/core/src/datasource/file_format/parquet.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,9 +1718,7 @@ mod tests {
17181718
async fn test_statistics_from_parquet_metadata() -> Result<()> {
17191719
_run_test_statistics_from_parquet_metadata(ForceViews::No).await?;
17201720

1721-
// Proved that this test will pass once the next arrow release occurs.
1722-
// Refer to https://github.com/influxdata/arrow-datafusion/pull/37
1723-
// _run_test_statistics_from_parquet_metadata(true).await?;
1721+
_run_test_statistics_from_parquet_metadata(ForceViews::Yes).await?;
17241722

17251723
Ok(())
17261724
}

datafusion/core/src/datasource/physical_plan/parquet/mod.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,11 +2091,8 @@ mod tests {
20912091
Ok(())
20922092
}
20932093

2094-
/// parquet's get_data_page_statistics is not yet implemented
2095-
/// for view types.
2096-
#[should_panic(expected = "not implemented")]
20972094
#[tokio::test]
2098-
async fn test_struct_filter_parquet_with_view_types() {
2095+
async fn test_struct_filter_parquet_with_view_types() -> Result<()> {
20992096
let tmp_dir = TempDir::new().unwrap();
21002097
let path = tmp_dir.path().to_str().unwrap().to_string() + "/test.parquet";
21012098
write_file(&path);
@@ -2111,7 +2108,17 @@ mod tests {
21112108
.await
21122109
.unwrap();
21132110
let sql = "select * from base_table where name='test02'";
2114-
let _ = ctx.sql(sql).await.unwrap().collect().await.unwrap();
2111+
let batch = ctx.sql(sql).await.unwrap().collect().await.unwrap();
2112+
assert_eq!(batch.len(), 1);
2113+
let expected = [
2114+
"+---------------------+----+--------+",
2115+
"| struct | id | name |",
2116+
"+---------------------+----+--------+",
2117+
"| {id: 4, name: aaa2} | 2 | test02 |",
2118+
"+---------------------+----+--------+",
2119+
];
2120+
crate::assert_batches_eq!(expected, &batch);
2121+
Ok(())
21152122
}
21162123

21172124
fn write_file(file: &String) {

0 commit comments

Comments
 (0)