Skip to content

Conversation

@kerwin-zk
Copy link
Contributor

Purpose

Support UPDATE on Paimon append-only table in spark V2 write

Tests

CI

@kerwin-zk kerwin-zk force-pushed the v2-update-append-table branch 6 times, most recently from 7f4431c to 7b3ff79 Compare January 22, 2026 09:15
@kerwin-zk kerwin-zk force-pushed the v2-update-append-table branch 2 times, most recently from 024e1ba to 2086847 Compare January 28, 2026 08:43
@kerwin-zk kerwin-zk force-pushed the v2-update-append-table branch from 2086847 to c8f9ae8 Compare January 28, 2026 08:56
/** Determines if DataSourceV2 update is not supported for the given table. */
protected def shouldFallbackToV1Update(table: SparkTable, updateTable: UpdateTable): Boolean = {
shouldFallbackToV1(table) ||
!updateTable.rewritable ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateTable.rewritable should always be true here, right?

extensions.injectPostHocResolutionRule(_ => PaimonDeleteTable)
extensions.injectPostHocResolutionRule(spark => PaimonMergeInto(spark))

extensions.injectPostHocResolutionRule(_ => RewritePaimonV2UpdateTable)
Copy link
Contributor

@YannByron YannByron Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to use one single-rule to deal with update operations. In it, we can always align assignments first, and then chose the v1/v2 code plan.

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.

3 participants