Skip to content

JNI bridge for the retention filter support for deletion vectors - #23423

Merged
gforsyth merged 3 commits into
NVIDIA:release/26.08from
jihoonson:retention-dv-jni
Jul 27, 2026
Merged

JNI bridge for the retention filter support for deletion vectors#23423
gforsyth merged 3 commits into
NVIDIA:release/26.08from
jihoonson:retention-dv-jni

Conversation

@jihoonson

@jihoonson jihoonson commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

First of all, I apologize for making a PR targeting the 26.08 branch. I understand the code freeze has taken effect since yesterday, but wish this change can still be shipped in the 26.08 release.

Description

This PR adds the JNI bridge for the recent change in #23402 to support the retention filter for the deletion vector. Previously, it was assumed that deletion vectors represent only the rows deleted. With #23402 and this change, now Java applications can pass the correct filter type for deletion vectors.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jihoonson
jihoonson requested a review from a team as a code owner July 24, 2026 17:16
@github-actions github-actions Bot added the Java Affects Java cuDF API. label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 164ed419-6417-43de-bb95-fabee9f221fc

📥 Commits

Reviewing files that changed from the base of the PR and between f2439ed and bd3b5c4.

📒 Files selected for processing (3)
  • java/src/main/java/ai/rapids/cudf/DeletionVector.java
  • java/src/main/native/src/DeletionVectorJni.cpp
  • java/src/test/java/ai/rapids/cudf/DeletionVectorTableTest.java
🚧 Files skipped from review as they are similar to previous changes (3)
  • java/src/main/native/src/DeletionVectorJni.cpp
  • java/src/test/java/ai/rapids/cudf/DeletionVectorTableTest.java
  • java/src/main/java/ai/rapids/cudf/DeletionVector.java

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added support for retention vectors when reading Parquet data.
    • Retention vector handling is now available for both full-table reads and chunked reads.
    • Read results now correctly reflect rows retained by retention vectors.
  • Bug Fixes
    • Added validation to reject configurations that mix deletion vectors and retention vectors, preventing ambiguous read behavior.

Walkthrough

Deletion-vector metadata now records retention mode, validates that all vectors share one mode, and propagates it through Java, JNI, and native Parquet readers. Tests cover both modes and reject mixed deletion and retention vectors.

Changes

Retention vector support

Layer / File(s) Summary
Java retention contract and routing
java/src/main/java/ai/rapids/cudf/DeletionVector.java
DeletionVectorInfo stores isRetention; read paths validate a common vector type and pass it to native methods.
JNI retention propagation
java/src/main/native/src/DeletionVectorJni.cpp
JNI entry points pass the retention flag into deletion_vector_info.
Retention behavior validation
java/src/test/java/ai/rapids/cudf/DeletionVectorTableTest.java
Parameterized tests cover deletion and retention reads, while mixed vector types are asserted to throw IllegalArgumentException.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • rapidsai/cudf#23402: Adds corresponding C++/Parquet retention-vector support consumed by this Java/JNI propagation.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a JNI bridge for retention filter support in deletion vectors.
Description check ✅ Passed The description matches the changeset and explains the JNI bridge for retention filter support and related tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
java/src/main/native/src/DeletionVectorJni.cpp (1)

182-182: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Run clang-format on the new JNI call sites.

The added make_deletion_vector_info(...) calls are manually wrapped into overlong lines. Please format the file with clang-format before merging.

As per coding guidelines, C++ and CUDA code must be formatted with clang-format.

Also applies to: 273-273

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@java/src/main/native/src/DeletionVectorJni.cpp` at line 182, Run clang-format
on the new make_deletion_vector_info JNI call sites in DeletionVectorJni.cpp,
including both referenced call sites, and preserve the existing arguments and
behavior while applying the project’s standard C++ formatting.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@java/src/main/native/src/DeletionVectorJni.cpp`:
- Line 182: Run clang-format on the new make_deletion_vector_info JNI call sites
in DeletionVectorJni.cpp, including both referenced call sites, and preserve the
existing arguments and behavior while applying the project’s standard C++
formatting.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1789a313-44bf-4d14-9352-d0a2d248170c

📥 Commits

Reviewing files that changed from the base of the PR and between 9b00d88 and f2439ed.

📒 Files selected for processing (3)
  • java/src/main/java/ai/rapids/cudf/DeletionVector.java
  • java/src/main/native/src/DeletionVectorJni.cpp
  • java/src/test/java/ai/rapids/cudf/DeletionVectorTableTest.java

@mhaseeb123 mhaseeb123 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving C++ changes

@revans2 revans2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it is okay that we are breaking backwards compatibility on one one API. I just wanted to check.

Comment thread java/src/main/java/ai/rapids/cudf/DeletionVector.java
@revans2 revans2 added 3 - Ready for Review Ready for review by team Spark Functionality that helps Spark RAPIDS breaking Breaking change labels Jul 24, 2026
@jihoonson jihoonson added the feature request New feature or request label Jul 24, 2026
@gforsyth

Copy link
Copy Markdown
Contributor

@GregoryKimball approved the (small) breaking change on slack -- merging this in

@gforsyth
gforsyth merged commit 5beaa59 into NVIDIA:release/26.08 Jul 27, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team breaking Breaking change feature request New feature or request Java Affects Java cuDF API. Spark Functionality that helps Spark RAPIDS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants