-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-35033: [Java] [Datasets] Add support for multi-file datasets from Java #35034
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
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or In the case of PARQUET issues on JIRA the title also supports: See also: |
|
Unsure why the flight-core test is failing, doesn't seem related to my change. |
| [] (const auto& p1, const auto& p2) { | ||
| return p1.first->type_name() == p2.first->type_name(); | ||
| }) - filesystems.begin() != 1) { | ||
| JniThrow("Different filesystems are not supported in a multi-file dataset."); |
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.
Could be possible to add the message that contains detail about what different filesystem the user are trying to use?
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 should be using #34420
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.
Agreed on both counts, I'll wait for #34420 to clean this up a bit. and then create a better exception.
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.
@noahfournier FYI #34420 is merged now
java/dataset/src/main/java/org/apache/arrow/dataset/file/JniWrapper.java
Show resolved
Hide resolved
|
|
||
| AutoCloseables.close(datum); | ||
|
|
||
| } |
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.
Could be possible to add testing for exception throws: (1) Invalid URI , (2) ensure that they all share a FileSystem type
java/dataset/src/main/java/org/apache/arrow/dataset/file/JniWrapper.java
Show resolved
Hide resolved
| [] (const auto& p1, const auto& p2) { | ||
| return p1.first->type_name() == p2.first->type_name(); | ||
| }) - filesystems.begin() != 1) { | ||
| JniThrow("Different filesystems are not supported in a multi-file dataset."); |
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 should be using #34420
|
Sorry for the delay on this one. I've added the test as requested, and cleaned up the implementation using #34420 |
lidavidm
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.
Thank you!
|
Benchmark runs are scheduled for baseline = 018e7d3 and contender = cd42895. cd42895 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
… from Java (apache#35034) I'd like to add support for multi-file datasets (in different directories) in the Java bindings. This PR adds to the existing Datasets API to allow an array of URIs to be passed in. The logic for whether the URIs passed are valid or not exists in the JNI layer. * Closes: apache#35033 Lead-authored-by: NoahFournier <fourniernoah6@gmail.com> Co-authored-by: NoahFournier <63198198+NoahFournier@users.noreply.github.com> Signed-off-by: David Li <li.davidm96@gmail.com>
I'd like to add support for multi-file datasets (in different directories) in the Java bindings.
This PR adds to the existing Datasets API to allow an array of URIs to be passed in. The logic for whether the URIs passed are valid or not exists in the JNI layer.