You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "saikrishna1-bidgely (via GitHub)" <gi...@apache.org> on 2023/02/15 16:21:12 UTC

[GitHub] [arrow-datafusion] saikrishna1-bidgely commented on a diff in pull request #4908: Allow `SessionContext::read_csv`, etc to read multiple files

saikrishna1-bidgely commented on code in PR #4908:
URL: https://github.com/apache/arrow-datafusion/pull/4908#discussion_r1107349323


##########
datafusion/core/src/execution/context.rs:
##########
@@ -106,6 +106,43 @@ use super::options::{
     AvroReadOptions, CsvReadOptions, NdJsonReadOptions, ParquetReadOptions, ReadOptions,
 };
 
+/// DataFilePaths adds a method to convert strings and vector of strings to vector of URLs.
+/// This is primarily used as restriciton on the input to methods like read_csv, read_avro
+/// and the rest.
+pub trait DataFilePaths {
+    /// Parse to a list of URLs
+    fn to_urls(self) -> Result<Vec<ListingTableUrl>>;
+}
+
+impl DataFilePaths for &str {

Review Comment:
   I'm trying to implement for AsRef<str> along with an iterator. I'll update once it's ready.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org