alamb commented on a change in pull request #1715:
URL: https://github.com/apache/arrow-datafusion/pull/1715#discussion_r802967720



##########
File path: datafusion/src/datasource/listing/table.rs
##########
@@ -420,20 +552,10 @@ mod tests {
     async fn load_table(name: &str) -> Result<Arc<dyn TableProvider>> {
         let testdata = crate::test_util::parquet_test_data();
         let filename = format!("{}/{}", testdata, name);
-        let opt = ListingOptions {
-            file_extension: DEFAULT_PARQUET_EXTENSION.to_owned(),
-            format: Arc::new(ParquetFormat::default()),
-            table_partition_cols: vec![],
-            target_partitions: 2,
-            collect_stat: true,
-        };
-        // here we resolve the schema locally
-        let schema = opt
-            .infer_schema(Arc::new(LocalFileSystem {}), &filename)
-            .await
-            .expect("Infer schema");
-        let table =
-            ListingTable::new(Arc::new(LocalFileSystem {}), filename, schema, 
opt);
+        let config = ListingTableConfig::new(Arc::new(LocalFileSystem {}), 
filename)
+            .infer()

Review comment:
       this is cool




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to