Skip to content

[feature](paimon) support native writes for append-only tables - #67531

Draft
suxiaogang223 wants to merge 1 commit into
apache:branch-4.1from
suxiaogang223:codex/native-paimon-write-phase1
Draft

[feature](paimon) support native writes for append-only tables#67531
suxiaogang223 wants to merge 1 commit into
apache:branch-4.1from
suxiaogang223:codex/native-paimon-write-phase1

Conversation

@suxiaogang223

Copy link
Copy Markdown
Member

What problem does this PR solve?

Problem Summary:

Paimon writes currently go through the Java/JNI writer. This PR introduces the first phase of a Doris-native Paimon writer for eligible append-only tables while retaining the JNI writer as a compatibility fallback.

Phase 1 supports unpartitioned, primary-key-free, bucket-unaware append-only tables using Parquet with metadata statistics disabled. Unsupported table layouts, options, types, overwrite operations, and row-level changelog writes automatically fall back to JNI.

The implementation:

  • Adds a native Paimon BE write backend based on the existing Arrow Parquet transformer.
  • Builds Arrow schemas with Paimon/Parquet field IDs, including nested collection field IDs.
  • Returns structured native data-file metadata to FE.
  • Constructs Paimon DataFileMeta and commit messages in FE and commits through the Paimon Java SDK.
  • Adds paimon_insert_mode, defaulting to native as a best-effort preference; jni forces the existing JNI path.
  • Keeps TPaimonWriteBackendType.FFI reserved for a future paimon-rust integration.
  • Does not include Variant support; that is planned for phase 2.

Release note

Support native Parquet writes for eligible Paimon append-only tables.

Validation

  • mvn -pl fe-core -am -DskipTests -Dcheckstyle.skip=true compile
  • mvn -pl fe-core -am -DskipTests -Dcheckstyle.skip=true test-compile
  • /home/socrates/ldb_toolchain/bin/clang-format --dry-run -Werror <changed BE files>
  • git diff --check

BE compilation has intentionally not been run yet. The worktree reuses the main Doris checkout third-party installation and the local LDB toolchain.

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test
    • No need to test or manual test.
  • Behavior changed:

    • No.
    • Yes. Eligible Paimon append-only inserts prefer the native writer by default and otherwise fall back to JNI. Set paimon_insert_mode=jni to force JNI.
  • Does this need documentation?

    • No.
    • Yes. The new session variable and supported native-write scope need documentation before the PR is marked ready.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@suxiaogang223
suxiaogang223 force-pushed the codex/native-paimon-write-phase1 branch from eb01cbe to 02d90d7 Compare September 4, 2026 08:44
@suxiaogang223
suxiaogang223 force-pushed the codex/native-paimon-write-phase1 branch from 02d90d7 to fc82493 Compare September 4, 2026 08:48
@suxiaogang223

Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 30.56% (55/180) 🎉
Increment coverage report
Complete coverage report

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.

2 participants