You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/08/24 17:06:23 UTC

[GitHub] [arrow-rs] alamb opened a new issue, #4735: Add read access to settings in `csv::WriterBuilder`

alamb opened a new issue, #4735:
URL: https://github.com/apache/arrow-rs/issues/4735

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   While implementing CSV writing in DataFusion (see https://github.com/apache/arrow-datafusion/pull/7390/files), we would like to be able to check the value of `has_headers` before actually constructing a csv writer. However, the current API has no way to do read the current values (only modify them): https://docs.rs/arrow-csv/45.0.0/arrow_csv/writer/struct.WriterBuilder.html
   
   
   **Describe the solution you'd like**
   It would be nice to have read only access to the fields. Maybe something like
   
   ```rust
       let builder = WriterBuilder::new().has_headers(false);
    
       let has_headers = builder.get_has_headers()
   ```
   
   It is somewhat unfortunate that the builder already uses `has_headers` to set the field names rather than `with_has_headers`
   
   **Describe alternatives you've considered**
   We can keep a copy of has_headers around as @devinjdangelo  has done in https://github.com/apache/arrow-datafusion/pull/7390/files
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


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

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


Re: [I] Add read access to settings in `csv::WriterBuilder` [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #4735:
URL: https://github.com/apache/arrow-rs/issues/4735#issuecomment-1768074490

   `label_issue.py` automatically added labels {'arrow'} from #4909


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


Re: [I] Add read access to settings in `csv::WriterBuilder` [arrow-rs]

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #4735: Add read access to settings in `csv::WriterBuilder`
URL: https://github.com/apache/arrow-rs/issues/4735


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


Re: [I] Add read access to settings in `csv::WriterBuilder` [arrow-rs]

Posted by "fansehep (via GitHub)" <gi...@apache.org>.
fansehep commented on issue #4735:
URL: https://github.com/apache/arrow-rs/issues/4735#issuecomment-1753014549

   Looks it is easy. 


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