-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Java Bindings for Hybrid Scan Parquet Reader #22456
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
Merged
rapids-bot
merged 16 commits into
rapidsai:main
from
paul-aiyedun:paul/add_hybrid_scan_java_bindings
Jul 7, 2026
Merged
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2c149d9
Add Java Bindings for Hybrid Scan Parquet Reader
paul-aiyedun 78011ad
Address CodeRabbit comments
paul-aiyedun 05880a6
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 1dfba16
Address CodeRabbit comments and add more checks
paul-aiyedun f142de3
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun b29fb8b
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 0f55c92
Address PR feedback
paul-aiyedun d068449
Avoid data page filtering with all-true row mask
paul-aiyedun 5c75a19
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 82bdbde
Add buffer validations, update comments, and remove unused functions
paul-aiyedun a2952d2
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 29e2c95
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun a96ec98
Address PR feedback
paul-aiyedun e8b16a2
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 984dd44
Merge branch 'main' into paul/add_hybrid_scan_java_bindings
paul-aiyedun 8f7ba95
Fix pre-commit failure
paul-aiyedun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package ai.rapids.cudf; | ||
|
|
||
| import java.util.Objects; | ||
|
|
||
| /** | ||
| * Immutable byte range describing an offset and size within a file or buffer. | ||
| * | ||
| * <p>Mirrors {@code cudf::io::text::byte_range_info}. | ||
| * | ||
| * <p>The APIs in this file are experimental and subject to change. | ||
| */ | ||
| @Experimental | ||
| public final class ByteRange { | ||
| private final long offset; | ||
| private final long size; | ||
|
|
||
| /** | ||
| * @param offset starting offset, in bytes, from the beginning of the source | ||
| * @param size length of the range, in bytes | ||
| */ | ||
| public ByteRange(long offset, long size) { | ||
| if (offset < 0) { | ||
| throw new IllegalArgumentException("offset must be >= 0, got " + offset); | ||
| } | ||
| if (size < 0) { | ||
| throw new IllegalArgumentException("size must be >= 0, got " + size); | ||
| } | ||
| this.offset = offset; | ||
| this.size = size; | ||
| } | ||
|
|
||
| /** @return starting byte offset within the source. */ | ||
| public long offset() { | ||
| return offset; | ||
| } | ||
|
|
||
| /** @return length of the byte range, in bytes. */ | ||
| public long size() { | ||
| return size; | ||
| } | ||
|
|
||
| /** @return {@code true} when the range has zero size. */ | ||
| public boolean isEmpty() { | ||
| return size == 0; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| if (this == o) return true; | ||
| if (!(o instanceof ByteRange)) return false; | ||
| ByteRange other = (ByteRange) o; | ||
| return offset == other.offset && size == other.size; | ||
| } | ||
|
|
||
| @Override | ||
| public int hashCode() { | ||
| return Objects.hash(offset, size); | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "ByteRange{offset=" + offset + ", size=" + size + "}"; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package ai.rapids.cudf; | ||
|
|
||
| import java.lang.annotation.Documented; | ||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| /** | ||
| * Marks a public type whose API is still considered experimental and may change | ||
| * without notice. Code annotated with {@code @Experimental} is not subject to | ||
| * cuDF Java compatibility guarantees. | ||
| * | ||
| * <p>Public nested types of an annotated type inherit the experimental status by | ||
| * association and do not need a separate marker. | ||
| */ | ||
| @Documented | ||
| @Retention(RetentionPolicy.CLASS) | ||
| @Target(ElementType.TYPE) | ||
| public @interface Experimental { | ||
|
paul-aiyedun marked this conversation as resolved.
|
||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should this be experimental since the
cudf::io::test::byte_range_infoisn't experimentalThere 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.
ByteRangeis annotated as experimental, since it is only used byHybridScanReader, which is experimental. We can remove the experimental annotation later, if any non-experimental class requires this class.