Skip to content

[spark] Add incremental refresh for Data Evolution ROW materializations - #11515

Draft
JingsongLi wants to merge 4 commits into
apache:masterfrom
JingsongLi:codex/paimon-java-mv-incremental
Draft

JingsongLi wants to merge 4 commits into
apache:masterfrom
JingsongLi:codex/paimon-java-mv-incremental

Conversation

@JingsongLi

@JingsongLi JingsongLi commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Let Spark 4.1 materialize frequently queried values, such as typed projections from a VARIANT column, into a ROW table. The target stores a deterministic single-source SELECT and optional filter in materialized-table.definition-query. Run CALL sys.refresh_materialized_table for bootstrap and subsequent refreshes.

  • The Java planner derives changed source row ranges from snapshot history and deletion vectors. The refresher reads one pinned source snapshot and publishes ROW files, target deletion vectors, and the applied source snapshot ID together.
  • The target commit validates the expected snapshot and schema. Missing source history, row-ID reassignment, or a source schema change between snapshots triggers a rebuild. Keep the source and SELECT fixed for a target.
  • The procedure documentation includes SQL setup, refresh behavior, and concurrency boundaries.

Tests

  • Maven package with -Pspark4 -Dmaven.jar.forceCreation=true passed 246 Java tests and 75 Spark tests, including 16 materialized-table SQL cases.
  • Coverage includes bootstrap, partial-column updates, DV deletes, MERGE, overwrite, partition drop, truncate, row-ID reassignment, and combined nested-column, BLOB, and vector updates.
  • Java regressions cover checkpoint recovery, commit retries, schema and branch handling, and concurrent target changes.

@JingsongLi
JingsongLi marked this pull request as draft November 29, 2026 01:59
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.

1 participant