Skip to content

feat(java/driver/jni): implement getStatistics#4361

Open
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:jni-statistics
Open

feat(java/driver/jni): implement getStatistics#4361
lidavidm wants to merge 2 commits into
apache:mainfrom
lidavidm:jni-statistics

Conversation

@lidavidm
Copy link
Copy Markdown
Member

@lidavidm lidavidm commented Jun 4, 2026

Closes #4360.

@lidavidm lidavidm requested review from amoeba, Copilot and zeroshade and removed request for zeroshade June 4, 2026 04:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables the ADBC getStatistics() / getStatisticNames() metadata APIs in the Java JNI driver by wiring the Java AdbcConnection methods through the JNI layer to the underlying C driver implementations, and adds PostgreSQL integration coverage to validate the new bindings.

Changes:

  • Implement AdbcConnection#getStatistics(...) and AdbcConnection#getStatisticNames() in JniConnection.
  • Add JNI-native method declarations and loader wrappers for both APIs.
  • Implement the JNI C++ wrappers that call AdbcConnectionGetStatistics / AdbcConnectionGetStatisticNames, plus add Postgres integration tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
java/driver/jni/src/main/java/org/apache/arrow/adbc/driver/jni/JniConnection.java Adds getStatistics and getStatisticNames overrides that import native streams into an ArrowReader.
java/driver/jni/src/main/java/org/apache/arrow/adbc/driver/jni/impl/NativeAdbc.java Declares the new native entry points for statistics APIs.
java/driver/jni/src/main/java/org/apache/arrow/adbc/driver/jni/impl/JniLoader.java Adds safe wrapper methods around the new NativeAdbc calls.
java/driver/jni/src/main/cpp/jni_wrapper.cc Implements JNI glue for connectionGetStatistics and connectionGetStatisticNames.
java/driver/jni-validation/src/test/java/org/apache/arrow/adbc/driver/jni/PostgresIntegrationTest.java Adds integration tests covering both new connection APIs against PostgreSQL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lidavidm lidavidm marked this pull request as ready for review June 4, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java/driver/jni: enable getStatistics

2 participants