Commits


Hengruo Zhang authored and Andy Grove committed f9cd2958a75
ARROW-6274: [Rust] [DataFusion] Add support for writing results to CSV I think if we implement a function converting Relation to CSV string, it is a duplicate of some functions in arrow/csv/writer.rs, so I just added a function to export all RecordBatches in Relation. Also, I encapsulated StringWriter in arrow/utils/string_writer.rs, as a Write trait's implementation, which can be set as arrow::csv::Writer 's parameter. In fact, it is not an elegant implementation. I have planned to implement a function converting Vec<& RecordBatch> to string, however, the same issue, it is duplicate. And another way is that we can convert Vec<& RecordBatch> to Vec<Vec<String>> first and convert it into a string or write it into a file, but it may have performance issue when there are many rows. Any suggestions are welcome. Thanks! Closes #5577 from hengruo/ARROW-6274 and squashes the following commits: e89623fc3 <Hengruo Zhang> ARROW-6274: rename 'bow' to 'beginning' f5a6ae0a0 <Hengruo Zhang> ARROW-6274 Authored-by: Hengruo Zhang <who@hengruo.me> Signed-off-by: Andy Grove <andygrove73@gmail.com>