Skip to content

[GLUTEN-9337][CORE] Add structured Paimon scans for the Velox connector - #13835

Draft
taowenjun wants to merge 1 commit into
apache:mainfrom
taowenjun:feature-paimon-velox-native-scan
Draft

taowenjun wants to merge 1 commit into
apache:mainfrom
taowenjun:feature-paimon-velox-native-scan

Conversation

@taowenjun

Copy link
Copy Markdown

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 IBM/velox#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 #9337 (comment) 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)

@github-actions github-actions Bot added CORE works for Gluten Core VELOX DOCS labels Nov 28, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core DOCS VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant