Skip to content

feat: add table update to write builder#372

Open
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:table-update
Open

feat: add table update to write builder#372
QuakeWang wants to merge 1 commit into
apache:mainfrom
QuakeWang:table-update

Conversation

@QuakeWang

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: Part of #232

DataEvolutionWriter was exposed as a lower-level writer and DataFusion DML created it directly, while WriteBuilder only covered write and commit construction. This made the table-level write API incomplete and kept UPDATE / MERGE INTO data-evolution paths outside the builder flow.

This PR introduces TableUpdate as the table-level update API and wires data-evolution UPDATE / MERGE INTO through WriteBuilder::new_update(...).

Brief change log

  • Add public TableUpdate as a thin wrapper around DataEvolutionWriter.
  • Add WriteBuilder::new_update(update_columns).
  • Export TableUpdate from paimon::table and crate root.
  • Update DataFusion data-evolution UPDATE / MERGE INTO to create update writers through WriteBuilder.
  • Reuse one WriteBuilder for MERGE INTO update writer, insert writer, and commit.

Tests

  • cargo fmt --all -- --check
  • cargo clippy -p paimon -p paimon-datafusion --all-targets --features fulltext,vortex -- -D warnings
  • cargo test -p paimon table::write_builder
  • cargo test -p paimon table::data_evolution_writer
  • cargo test -p paimon-datafusion --test update_tests
  • cargo test -p paimon-datafusion --test merge_into_tests

API and Format

Adds public TableUpdate and WriteBuilder::new_update(...).

Documentation

Signed-off-by: QuakeWang <wangfuzheng0814@foxmail.com>
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