Apache Software Foundation / SeaTunnel
Merged upstreamFeatureMerged Aug 23, 2026

Support Doris partition cleanup for DROP_DATA

Improved SeaTunnel's Doris sink so `data_save_mode = DROP_DATA` honors `doris.config.partitions`, truncating only the configured formal partitions before loading into those same partitions.

apache/seatunnel · #11917

Data-safety improvement

Doris DROP_DATA cleanup can now truncate only configured target partitions instead of the whole table.

Problem

The Doris sink forwarded `doris.config.partitions` to Stream Load, but `DROP_DATA` cleanup still truncated the entire target table before writing. That could remove data from partitions outside the intended load scope.

Approach

Parsed, validated, normalized, and reused configured Doris partitions for save-mode cleanup; generated quoted partition-scoped truncate SQL; preserved whole-table truncate when no partitions are configured; and updated English and Chinese Doris sink docs.

Impact and scope

  • Prevents unintended deletion of Doris table data outside the partitions being loaded.
  • Keeps cleanup and Stream Load targets aligned by normalizing one shared partition list.
  • Preserves backward compatibility because existing jobs without `doris.config.partitions` continue using whole-table cleanup.

Validation

  • Added unit coverage for partition normalization, blank and duplicate partition rejection, quoted SQL generation, whole-table fallback, non-DROP_DATA behavior, and newly-created table lifecycle guards.
  • Verified the complete Doris connector unit suite with 130 passing tests.
  • Verified the Doris connector and reactor dependencies with Maven package verification, with maintainer approval before merge.