File tree Expand file tree Collapse file tree 2 files changed +13
-8
lines changed
datafusion/core/src/datasource Expand file tree Collapse file tree 2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -1718,9 +1718,7 @@ mod tests {
1718
1718
async fn test_statistics_from_parquet_metadata ( ) -> Result < ( ) > {
1719
1719
_run_test_statistics_from_parquet_metadata ( ForceViews :: No ) . await ?;
1720
1720
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 ?;
1724
1722
1725
1723
Ok ( ( ) )
1726
1724
}
Original file line number Diff line number Diff line change @@ -2091,11 +2091,8 @@ mod tests {
2091
2091
Ok ( ( ) )
2092
2092
}
2093
2093
2094
- /// parquet's get_data_page_statistics is not yet implemented
2095
- /// for view types.
2096
- #[ should_panic( expected = "not implemented" ) ]
2097
2094
#[ tokio:: test]
2098
- async fn test_struct_filter_parquet_with_view_types ( ) {
2095
+ async fn test_struct_filter_parquet_with_view_types ( ) -> Result < ( ) > {
2099
2096
let tmp_dir = TempDir :: new ( ) . unwrap ( ) ;
2100
2097
let path = tmp_dir. path ( ) . to_str ( ) . unwrap ( ) . to_string ( ) + "/test.parquet" ;
2101
2098
write_file ( & path) ;
@@ -2111,7 +2108,17 @@ mod tests {
2111
2108
. await
2112
2109
. unwrap ( ) ;
2113
2110
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 ( ( ) )
2115
2122
}
2116
2123
2117
2124
fn write_file ( file : & String ) {
You can’t perform that action at this time.
0 commit comments