alamb opened a new issue, #3513:
URL: https://github.com/apache/arrow-rs/issues/3513
**Describe the bug**
The formatting of floats as printed by `pretty_print_batches` and the CSV
Writer is inconsistent
**To Reproduce**
```rust
fn main() {
let arr = Float64Array::from(vec![Some(1.0), None, Some(2.0)]);
let batch = RecordBatch::try_from_iter(vec![
("col", Arc::new(arr) as _)
]).unwrap();
println!("Display");
println!("{}", pretty_format_batches(&[batch.clone()]).unwrap());
println!("CSV");
let mut writer = Writer::new(std::io::stdout());
writer.write(&batch).unwrap();
}
```
Produces the output:
```
Display
+-----+
| col |
+-----+
| 1 |
| |
| 2 |
+-----+
CSV
col
1.0
""
2.0
```
Note how pretty print shows `1` and csv shows `1.0`
**Expected behavior**
I expect the displays to be the same (likely by making the csv writer
consistent with the pretty printer)
**Additional context**
See other usecase on on
https://github.com/apache/arrow-datafusion/issues/4876
I think https://github.com/apache/arrow-rs/issues/3483 from @JayjeetAtGithub
covers one potential implementation mechanism
--
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]