Repository navigation
Add optional Arrow Java integration and JDK 25 allocator compatibility - #38
Merged
Merged
Conversation
Contributor
Author
|
@wudidapaopao, please review this PR |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add the optional
com.clickhouse.chdb:chdb-arrowmodule using Arrow Java 19.0.0 and the native Arrow C Data/C Stream ABI. The development binding is1.0.0-rc.3-SNAPSHOT, pinned to the published chDB corev26.11.0-rc.3and JNI ABI 3 on four platform packages. This PR does not publish a Java artifact; existing JDBCResultSet/RowBinary behavior and the ordinary JDBC dependency tree remain unchanged.Arrow Java API
VectorSchemaRootcurrent batch or a one-shot, registration-ownedArrowReaderas an in-memory SQL source with a closablearrowstream('name')fragment.ArrowQuery, partial-consumption close, cooperative cancellation, and connection/native-handle leases.chdb_insert_arrow_stream. Source columns must have distinct names; the destination is validated and quoted. There is no implicit table creation or transaction guarantee.Verification and CI follow-up
v26.11.0-rc.3macOS arm64 asset, checksum, header, and staged JNI pair were verified without an engine-version override.LicenseInventoryITmatches 1081 components from that binary.RootAllocatorinitialization on JDK 25 across the completed platform jobs: Arrow 19's Netty allocator reachedEmptyByteBuf.memoryAddress()and threwUnsupportedOperationException. This change selects Arrow 19's officialarrow-memory-unsafebackend instead of Netty. JDK 26 reproduced the former failure locally and passes after the change; JDK 25 itself still needs CI verification. JDK 26 warns about future removal of somesun.misc.Unsafemethods, so forward compatibility beyond the supported matrix is not implied.build.ymlexercises the native Arrow suite on Linux x86_64/aarch64 and macOS arm64/x86_64 across JDK 11/17/21/25, archives reports and crash logs, and fails a platform job on any Maven failure. This same-repository PR also allows Macroscope to run; Add optional Arrow Java integration pinned to chdb-core v26.11.0-rc.3 #37's Macroscope check explicitly skipped cross-repository PRs.Limits and follow-up
The disabled insert-conversion regression is not counted as passed. On published rc.3, an Arrow UTF-8
id="not-an-integer"inserted into anInt64column reports one row written and stores0, whereas ordinary SQL rejects it withCANNOT_PARSE_TEXT. Re-enable the regression after a core fix; do not silently coerce in Java. A2 sources are one-shot, A4 cancellation waits for an in-flight fetch, and A5 targets existing tables. Production use and a subsequent Java RC require review of this PR's four-platform results and normal publishing gates.Note
Add experimental
chdb-arrowmodule with materialized, streaming, and insert Arrow APIschdb-arrowMaven module providingArrowSessionfor Arrow-based queries without IPC serialization: materialized queries (queryArrowMaterialized), lazy streaming queries (queryArrowviaArrowQuery), batch registration (registerBatch), and inserts (insertBatch)ArrowStreamHandlekind; bumps JNI ABI from 2 to 3ChdbConnectionto track Arrow queries and register cleanup hooks;close()now closes tracked Arrow queries and runs Arrow hooks before closing statementsArrowOptionsfor type mapping (binary, dictionary, UTF-8 string) and CI runs Arrow tests in the Java-version matrixengine.properties, version comments, license inventory, and docsMacroscope summarized bacd685.