suxiaogang223 opened a new pull request, #66498:
URL: https://github.com/apache/doris/pull/66498

   ## What changed
   
   This PR adds row-level DML support for Apache Paimon tables through the 
Doris Paimon catalog:
   
   - `UPDATE ... SET ... WHERE ...`
     - Supports expressions in assignments and predicates.
     - Supports primary-key tables using the `deduplicate` and `partial-update` 
merge engines.
     - Rejects updates to primary-key columns.
   - `DELETE FROM ... WHERE ...`
     - Supports primary-key tables using `deduplicate`.
     - Supports `partial-update` and `aggregate` tables when their Paimon 
delete/removal options are enabled.
   - `MERGE INTO ... USING ... ON ...`
     - Supports conditional `WHEN MATCHED THEN UPDATE`.
     - Supports conditional `WHEN MATCHED THEN DELETE`.
     - Supports conditional `WHEN NOT MATCHED THEN INSERT`.
     - Supports combining update, delete, and insert branches in one statement.
   
   Append-only tables are rejected for row-level DML. Unsupported merge engines 
and table options fail during analysis with explicit error messages.
   
   ## Implementation
   
   - Adds dedicated Nereids commands for Paimon UPDATE, DELETE, and MERGE.
   - Carries a per-row operation value through the logical and physical Paimon 
sink.
   - Converts the operation value into Paimon row kinds in the JNI writer.
   - Binds changelog sink outputs at the logical sink level, preserving the 
operation column while coercing data columns to the target schema.
   - Adds target-table collection and schema-change retry integration for bound 
Paimon row-level sinks.
   - Adds regression coverage for successful UPDATE, DELETE, and mixed MERGE 
operations, plus unsupported append-only and `first-row` cases.
   
   ## User impact
   
   Users can modify existing Paimon primary-key tables directly with standard 
Doris SQL instead of rewriting the table through INSERT or an external compute 
engine.
   
   ## Validation
   
   - `BUILD_TYPE=Debug DISABLE_BUILD_UI=ON ./build.sh --fe -j12`
   - Debug BE build using the Doris toolchain
   - `test_paimon_write_row_level_dml`: UPDATE, DELETE, MERGE, and negative 
cases all passed
   - FE and BE deployment health checks passed
   
   Related to #65086
   


-- 
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