apache / apache/doris

Tracking: Paimon table write support

Open
#65,086 2 comments 0 reactions 1 assignee Claimed by @suxiaogang223 View on GitHub
tracking issue
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
520

Description

## Background

Apache Doris already supports reading Apache Paimon tables through External Catalog. To complete the read/write experience for lakehouse workloads, we are adding support for writing data from Doris into Paimon tables, so users can write query results and computed data into Paimon tables using standard Doris SQL.

This issue tracks the feature requirements and implementation plan for Paimon write support.

## Goals

- Support `INSERT INTO` for Paimon tables.
- Support `INSERT OVERWRITE` for Paimon tables.
- Support append-only tables and primary-key tables.
- Support partitioned, fixed bucket, and unaware bucket tables.
- Support primitive types and complex types (ARRAY, MAP, STRUCT).
- Align Doris transaction semantics with Paimon commit and abort.
- Preserve correctness for failure, retry, and rollback scenarios.

## Current Status

Core Paimon JNI write support and the main merged follow-up work are implemented on branch-4.1:

- #65868: core JNI write path and schema evolution.
- #66325: P0 write correctness and snapshot-reference coverage.
- #66498: row-level `UPDATE`, `DELETE`, and `MERGE`.
- #66685: partition- and bucket-aware concurrent writes for supported routing modes.
- #67023: write-cache coherence fixes and extended regression coverage.

Status legend:

- βœ… Implemented
- 🚧 Partially implemented; remaining modes are follow-up work
- ➑️ Follow-up work

## Feature Checklist

### Write Path & DML

| Feature | Status |
|---------|--------|
| `INSERT INTO ... SELECT ...` | βœ… |
| `INSERT INTO ... VALUES ...` | βœ… |
| Non-partitioned `INSERT OVERWRITE` | βœ… |
| Static partition overwrite | βœ… |
| Partial static partition overwrite | βœ… |
| Dynamic partition overwrite | βœ… |
| Empty-input overwrite | βœ… |
| Row-level `UPDATE` / `DELETE` / `MERGE` SQL | βœ… |

### Table Types & Write Semantics

| Feature | Status |
|---------|--------|
| Append-only tables | βœ… |
| Primary-key full-row writes | βœ… |
| Deduplicate merge engine | βœ… |
| Partial-update merge engine | βœ… |
| Aggregation merge engine | βœ… |
| First-row merge engine | βœ… |
| Omitted-column schema defaults | βœ… |

### Partitioning & Bucketing

| Feature | Status |
|---------|--------|
| Non-partitioned tables | βœ… |
| Partitioned tables | βœ… |
| Fixed bucket | βœ… |
| Unaware bucket | βœ… |
| Postpone bucket | βœ… |
| Hash dynamic bucket | βœ… |
| Key dynamic bucket | βœ… |
| Bucket-aware parallel distribution | 🚧 |

Fixed-bucket tables now use Paimon-compatible `(partition, bucket)` routing so each bucket has one stable writer within a write job. Bucket-unaware tables retain concurrent random distribution. Hash-dynamic, key-dynamic, custom bucket functions, and unsupported partition or bucket key types continue to use the correctness-first single-writer fallback.

### Data Types

| Feature | Status |
|---------|--------|
| Primitive types | βœ… |
| DECIMAL, DATE, TIMESTAMP | βœ… |
| ARRAY, MAP, STRUCT | βœ… |
| Nested NULL handling | βœ… |

### Commit & Transaction

| Feature | Status |
|---------|--------|
| FE-coordinated atomic commit | βœ… |
| Multiple-writer commit aggregation | βœ… |
| Commit idempotency and reconciliation | βœ… |
| Abort and rollback cleanup | βœ… |
| Commit-message deduplication | βœ… |
| Empty overwrite commit | βœ… |

### Write Backend

| Feature | Status |
|---------|--------|
| Java SDK backend through JNI | βœ… |
| Rust SDK backend through FFI | ➑️ Follow-up PR |

### Changelog & Compaction

| Feature | Status |
|---------|--------|
| Changelog producer: None | βœ… |
| Changelog producer: Input | βœ… |
| Changelog producer: Lookup | βœ… |
| Changelog producer: FullCompaction | βœ… |
| Automatic write-time compaction correctness | βœ… |

### Catalog & Storage

| Feature | Status |
|---------|--------|
| Filesystem catalog | βœ… |
| HDFS | βœ… |
| Object storage | βœ… |
| HMS catalog suite | βœ… |
| REST catalog suite | βœ… |

The HMS and REST catalog write suites have been added under `external_table_p2`.

### Schema & DDL

| Feature | Status |
|---------|--------|
| Paimon CREATE TABLE | βœ… |
| CREATE properties and write integration | βœ… |
| ADD/DROP/RENAME/MODIFY COLUMN | βœ… |
| Column reorder | βœ… |
| Schema-change and write integration | βœ… |
| Latest remote-schema projection | βœ… |
| Typed partition metadata | βœ… |

## Remaining Follow-up Work

1. Bucket-aware parallel routing for hash-dynamic, key-dynamic, custom bucket functions, and currently unsupported key types.
2. Rust FFI write backend.
3. Paimon Branch/Tag lifecycle and branch writes: #67336
4. Paimon maintenance procedures and actions: #67337

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.