Skip to content

Commit

Permalink
test(12123): update tests to pass now that latest arrow-rs release is in
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedld committed Sep 9, 2024
1 parent 00d921c commit cb30be7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 1 addition & 3 deletions datafusion/core/src/datasource/file_format/parquet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1718,9 +1718,7 @@ mod tests {
async fn test_statistics_from_parquet_metadata() -> Result<()> {
_run_test_statistics_from_parquet_metadata(ForceViews::No).await?;

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

Ok(())
}
Expand Down
17 changes: 12 additions & 5 deletions datafusion/core/src/datasource/physical_plan/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2091,11 +2091,8 @@ mod tests {
Ok(())
}

/// parquet's get_data_page_statistics is not yet implemented
/// for view types.
#[should_panic(expected = "not implemented")]
#[tokio::test]
async fn test_struct_filter_parquet_with_view_types() {
async fn test_struct_filter_parquet_with_view_types() -> Result<()> {
let tmp_dir = TempDir::new().unwrap();
let path = tmp_dir.path().to_str().unwrap().to_string() + "/test.parquet";
write_file(&path);
Expand All @@ -2111,7 +2108,17 @@ mod tests {
.await
.unwrap();
let sql = "select * from base_table where name='test02'";
let _ = ctx.sql(sql).await.unwrap().collect().await.unwrap();
let batch = ctx.sql(sql).await.unwrap().collect().await.unwrap();
assert_eq!(batch.len(), 1);
let expected = [
"+---------------------+----+--------+",
"| struct | id | name |",
"+---------------------+----+--------+",
"| {id: 4, name: aaa2} | 2 | test02 |",
"+---------------------+----+--------+",
];
crate::assert_batches_eq!(expected, &batch);
Ok(())
}

fn write_file(file: &String) {
Expand Down

0 comments on commit cb30be7

Please sign in to comment.