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/06 10:22:19 UTC

[GitHub] [arrow-datafusion] jorgecarleitao commented on a change in pull request #487: Fixed inference of multiple json files.

jorgecarleitao commented on a change in pull request #487:
URL: https://github.com/apache/arrow-datafusion/pull/487#discussion_r646110025



##########
File path: datafusion/src/physical_plan/json.rs
##########
@@ -202,16 +202,11 @@ impl NdJsonExec {
         max_records: Option<usize>,
     ) -> Result<Schema> {
         let mut schemas = Vec::new();
-        let mut records_to_read = max_records.unwrap_or(usize::MAX);
-        while records_to_read > 0 && !filenames.is_empty() {
+        let lines_per_file = max_records.map(|x| x / filenames.len());

Review comment:
       Any idea what we should do in that case? take one line per file?




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