comphead commented on issue #2278:
URL: 
https://github.com/apache/arrow-datafusion/issues/2278#issuecomment-1113037505

   @andygrove @alamb 
   ```
           let plan = LogicalPlanBuilder::scan_csv(
               Arc::new(LocalFileSystem {}),
               "/tmp/xxxx/employee.csv",
               CsvReadOptions::new().schema(&schema).has_header(true),
               Some(vec![3, 4]),
               4,
           )
   ```
   leads to   `TableScan: /tmp/xxxx/employee.csv projection=Some([3, 4])`
   
   This happens because file path used as a table name. 
   ```
           Self::scan_csv_with_name(
               object_store,
               path.clone(),
               options,
               projection,
               path, <----- path is a table name here, the same is for avro, 
parq, etc
               target_partitions,
           )
   ```
   
   Proposed solution is to trunc the parent folder and extension and leave only 
the file name.
   Let me know your thoughts guys.


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