You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/08 14:50:03 UTC

[GitHub] [arrow-datafusion] kszucs commented on a change in pull request #524: [Python] Expose ExecutionContext.register_csv

kszucs commented on a change in pull request #524:
URL: https://github.com/apache/arrow-datafusion/pull/524#discussion_r647519310



##########
File path: python/src/context.rs
##########
@@ -97,6 +99,34 @@ impl ExecutionContext {
         Ok(())
     }
 
+    #[args(
+        has_header = "true",
+        delimiter = "b\",\"",
+        schema_infer_max_records = "1000",
+        file_extension = "\".csv\""
+    )]
+    fn register_csv(
+        &mut self,
+        name: &str,
+        path: &str,
+        has_header: bool,
+        delimiter: &[u8],

Review comment:
       Here we should have a `Schema` argument exposed as well, but I noticed that FFI hasn't been implemented for `Schema` and `DataType` objects in `arrow-rs`. We should probably expose all of the `ArrowSchema` based structs there first, then convert pyarrow objects using the C interface rather than calling out to python functions (like the datatype python bindings are currently implemented).




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

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