GH-35033: [Java] [Datasets] Add support for multi-file datasets from Java#35034
GH-35033: [Java] [Datasets] Add support for multi-file datasets from Java#35034lidavidm merged 7 commits intoapache:mainfrom
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.
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.
Agreed on both counts, I'll wait for #34420 to clean this up a bit. and then create a better exception.
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.
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."); |
|
Sorry for the delay on this one. I've added the test as requested, and cleaned up the implementation using #34420 |
|
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.