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 2023/01/11 23:40:54 UTC
[GitHub] [arrow-rs] alamb opened a new issue, #3513: Inconsistent output between pretty print and CSV writer for Arrow
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-rs] tustvold commented on issue #3513: Inconsistent output between pretty print and CSV writer for Arrow
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on issue #3513:
URL: https://github.com/apache/arrow-rs/issues/3513#issuecomment-1426076346
`label_issue.py` automatically added labels {'arrow'} from #3514
--
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
[GitHub] [arrow-rs] tustvold closed issue #3513: Inconsistent output between pretty print and CSV writer for Arrow
Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #3513: Inconsistent output between pretty print and CSV writer for Arrow
URL: https://github.com/apache/arrow-rs/issues/3513
--
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