taowenjun opened a new pull request, #13835:
URL: https://github.com/apache/gluten/pull/13835

   ## What changes are proposed in this pull request?
   
   Follow-up to #9337: prepare an opt-in bridge from Paimon Java planning to 
the Velox Paimon connector for batch scans, including the metadata needed by 
PK/DV readers.
   
   Today the Velox Paimon transformer rejects PK/DV tables and flattens 
supported splits into raw file ranges. This draft retains the Java catalog, 
snapshot planning and complete DataSplit boundaries, and introduces a 
structured native path rather than another paimon-cpp reader.
   
   ### Scope
   
   - Add versioned native table/read metadata alongside the existing ClickHouse 
SDK payload. Preserve full schema and field IDs, primary/partition keys, 
selected read options, snapshot identity, per-file metadata, nullable delete 
counts and aligned deletion-vector references.
   - Add JVM metadata conversion and an experimental setting: 
`spark.gluten.sql.columnar.backend.velox.paimon.reader.enabled=false` by 
default. The existing raw-file path and CH SDK payload remain unchanged by 
default.
   - Register/unregister a scoped Paimon connector with each native runtime, 
construct Paimon table/column handles, and dispatch complete logical splits to 
the connector.
   - Reject inconsistent table metadata, mixed snapshots, mixed file/schema 
combinations outside the qualified scope, and unsupported key/merge/sequence 
settings. Preserve table identity for empty input partitions.
   - Add protocol and native conversion tests, plus configuration documentation.
   
   ### Dependency and design discussion
   
   The initial PK scope is deduplicate with integer/string primary keys and no 
sequence-field override. Native plan validation requires a Velox baseline with 
merge-on-read, optional delete-count handling and lookup-merge semantics. The 
#13808 date baseline does not provide that complete combination; these 
capability checks keep PK scans rejected on that baseline.
   
   The relevant upstream Velox work is #20364, #20678 and #20695 (in 
facebookincubator/velox). IBM `oss-main` contains these changes; the 
Gluten-compatible baseline selection is discussed in 
https://github.com/IBM/velox/issues/3027 . This draft does not replace the 
project's Velox baseline or introduce a native write path.
   
   Feedback is especially welcome on the shared protocol boundary, connector 
lifecycle and the capability gate. This PR follows the proposal in 
https://github.com/apache/gluten/issues/9337#issuecomment-7242377918 and is not 
intended to close the umbrella issue yet.
   
   ## How was this patch tested?
   
   - `protoc` schema generation and encode/decode checks passed.
   - Generated Java protocol bindings compiled with JDK 17; executable 
round-trip checks passed for unknown versus explicit-zero delete counts, 
multiple files per logical split and null partition metadata.
   - Scoped Java/Scala Spotless formatting completed; modified C++ files 
formatted with clang-format 15.0.7.
   - `git diff --check` and staged UTF-8/LF checks passed.
   - Added `PaimonNativeProtocolSuite` and native conversion cases covering 
logical split/DV preservation, mixed-snapshot rejection, empty partitions, 
dedicated table handles and unsupported capability rejection.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-6)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to