alamb commented on code in PR #4908:
URL: https://github.com/apache/arrow-datafusion/pull/4908#discussion_r1072844902


##########
datafusion/core/src/execution/context.rs:
##########
@@ -551,12 +551,14 @@ impl SessionContext {
     }
 
     /// Creates a [`DataFrame`] for reading an Avro data source.
-    pub async fn read_avro(
+    pub async fn read_avro_with_multi_paths(

Review Comment:
   what do you think about calling this `read_avro_from_paths`? rather than 
`multi_paths`?



##########
datafusion/core/src/execution/context.rs:
##########
@@ -576,20 +578,31 @@ impl SessionContext {
             }
         };
 
-        let config = ListingTableConfig::new(table_path)
+        let config = ListingTableConfig::new_with_multi_paths(table_paths)
             .with_listing_options(listing_options)
             .with_schema(resolved_schema);
         let provider = ListingTable::try_new(config)?;
         self.read_table(Arc::new(provider))
     }
 
-    /// Creates a [`DataFrame`] for reading an Json data source.
-    pub async fn read_json(
+    /// Creates a [`DataFrame`] for reading an Avro data source.
+    pub async fn read_avro(
         &self,
         table_path: impl AsRef<str>,
+        options: AvroReadOptions<'_>,
+    ) -> Result<DataFrame> {
+        return self.read_avro_with_multi_paths(&[table_path], options).await;
+    }
+
+    /// Creates a [`DataFrame`] for reading an Json data source.

Review Comment:
   Perhaps we can update the docstring as well?



-- 
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