Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic_types example does not print the projection #1902

Closed
martin-g opened this issue Jun 17, 2022 · 0 comments · Fixed by #1903
Closed

dynamic_types example does not print the projection #1902

martin-g opened this issue Jun 17, 2022 · 0 comments · Fixed by #1903
Labels
arrow Changes to the arrow crate bug documentation Improvements or additions to documentation

Comments

@martin-g
Copy link
Member

Describe the bug

https://github.com/apache/arrow-rs/blob/master/arrow/examples/dynamic_types.rs shows how to use and project RecordBatches.
I think it would be a slightly more useful if it actually prints the original and the projection.

To Reproduce

$ cd arrow
$ cargo run --example dynamic_types

Expected behavior

Print the RecordBatches, e.g.:

+----+-----+
| id | sum |
+----+-----+
| 1  | 2.2 |
| 2  | 3.3 |
| 3  | 4.4 |
| 4  | 5.5 |
| 5  | 6.6 |
+----+-----+

Additional context
N/A

@martin-g martin-g added the bug label Jun 17, 2022
martin-g added a commit to martin-g/arrow-rs that referenced this issue Jun 17, 2022
…ynamic_types example

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
martin-g added a commit to martin-g/arrow-rs that referenced this issue Jun 17, 2022
Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
alamb pushed a commit that referenced this issue Jun 17, 2022
…_types example (#1903)

* Closes #1902: Print the original and projected RecordBatch in dynamic_types example

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>

* Issue #1902: Fix formatting issue

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
@alamb alamb added documentation Improvements or additions to documentation arrow Changes to the arrow crate labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug documentation Improvements or additions to documentation
Projects
None yet
2 participants