Skip to content

Commit

Permalink
test: proof that once apache#12032 merges, the PR for apache#12232 wi…
Browse files Browse the repository at this point in the history
…ll solve the issue
  • Loading branch information
wiedld committed Aug 29, 2024
1 parent 8cef364 commit a1edaa0
Showing 1 changed file with 12 additions and 5 deletions.
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 @@ -2090,11 +2090,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 @@ -2110,7 +2107,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 a1edaa0

Please sign in to comment.