-
Notifications
You must be signed in to change notification settings - Fork 48
[Java] Parquet reading example fails with Arrow v8.0 #207
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
Conversation
|
Hi @lidavidm please could you help with a review. |
java/source/dataset.rst
Outdated
| System.out.println("Batch: " + count[0]++ + ", RowCount: " + vsr.getRowCount()); | ||
| arrowRecordBatch.close(); | ||
| }); | ||
| try(ArrowReader reader = scanTask.execute()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try(ArrowReader reader = scanTask.execute()){ | |
| try (ArrowReader reader = scanTask.execute()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @toddfarmer, changed lots of places.
|
Should we add any comments around these code changes to highlight that the supplied example code is version (8.0.0)-specific? |
|
Maybe we should label the top level page, or perhaps include it in the page titles, or something? Also, I wonder if we can just snapshot the 'old' cookbook on each release and label it as the '7.0.0 cookbook' or something |
| <maven.compiler.source>8</maven.compiler.source> | ||
| <maven.compiler.target>8</maven.compiler.target> | ||
| <arrow.version>7.0.0</arrow.version> | ||
| <arrow.version>8.0.0</arrow.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to get this added to the list of post-release tasks and/or make it one of the things we check as part of release.
java/source/dataset.rst
Outdated
| final VectorUnloader unloader = new VectorUnloader(root); | ||
| try(ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()){ | ||
| loader.load(arrowRecordBatch); | ||
| System.out.print(vsr.contentToTSVString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: why not just root.contentToTSVString()? Is there a need to demonstrate VectorLoader/VectorUnloader here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
toddfarmer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @davisusanibar !
java/source/dataset.rst
Outdated
| }); | ||
| try(ArrowReader reader = scanTask.execute()){ | ||
| while (reader.loadNextBatch()) { | ||
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { | |
| try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) { |
java/source/dataset.rst
Outdated
| while (reader.loadNextBatch()) { | ||
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { | ||
| final VectorUnloader unloader = new VectorUnloader(root); | ||
| try(ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try(ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()){ | |
| try (ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()) { |
java/source/dataset.rst
Outdated
| }); | ||
| try(ArrowReader reader = scanTask.execute()){ | ||
| while (reader.loadNextBatch()) { | ||
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { | |
| try (VectorSchemaRoot root = reader.getVectorSchemaRoot()) { |
java/source/dataset.rst
Outdated
| while (reader.loadNextBatch()) { | ||
| try(VectorSchemaRoot root = reader.getVectorSchemaRoot()) { | ||
| final VectorUnloader unloader = new VectorUnloader(root); | ||
| try(ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| try(ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()){ | |
| try (ArrowRecordBatch arrowRecordBatch = unloader.getRecordBatch()) { |
Ticket created: #208 |
|
Note we can't deploy cookbook updates until we get the R cookbook fixed (#201) |
|
What about stackoverflow question? |
|
Do you want to just answer it? |
Yes, just mention the PR in case they need to continue with their work. |
PR to fix problems mention at: #206