This is an automated email from the ASF dual-hosted git repository.

JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new 261a90ab [core] Compact dedicated BLOB files in Data Evolution tables 
(#1407)
261a90ab is described below

commit 261a90ab508743379238186592e8d9e51c1381c9
Author: Nicholas Jiang <[email protected]>
AuthorDate: Mon Nov 16 13:22:31 2026 +0800

    [core] Compact dedicated BLOB files in Data Evolution tables (#1407)
---
 crates/paimon/src/table/compact.rs                 |   49 +-
 crates/paimon/src/table/compact/append.rs          |    1 +
 crates/paimon/src/table/compact/data_evolution.rs  |  119 +-
 .../src/table/compact/data_evolution/blob.rs       |  550 +++++++++
 .../paimon/src/table/compact/deletion_vectors.rs   |    5 +
 crates/paimon/src/table/compact/primary_key.rs     |    2 +
 crates/paimon/src/table/data_evolution_reader.rs   |   32 +-
 crates/paimon/src/table/table_commit.rs            |    8 +-
 .../paimon/src/table/table_commit/parity_tests.rs  |  341 +++++-
 crates/paimon/tests/blob_update/compaction.rs      | 1180 ++++++++++++++++++++
 crates/paimon/tests/blob_update_test.rs            |  179 +--
 .../tests/data_evolution_compact_layout_test.rs    |  290 +++--
 crates/paimon/tests/data_evolution_compact_test.rs |   38 +-
 docs/src/compaction.md                             |   68 +-
 14 files changed, 2491 insertions(+), 371 deletions(-)

diff --git a/crates/paimon/src/table/compact.rs 
b/crates/paimon/src/table/compact.rs
index fec2aae3..3accc4d6 100644
--- a/crates/paimon/src/table/compact.rs
+++ b/crates/paimon/src/table/compact.rs
@@ -49,13 +49,15 @@ use crate::{Error, Result};
 
 /// Creates planners, executors and a committer with one shared configuration.
 /// Output size and append task selection use the captured table options.
-/// Supports ordinary append, data-evolution normal files, and fixed or dynamic
-/// bucket PK tables. Data evolution preserves row IDs and logical deletions.
+/// Supports ordinary append, data-evolution normal and opt-in BLOB files,
+/// and fixed or dynamic bucket PK tables. Data evolution preserves row IDs
+/// and logical deletions.
 pub struct CompactBuilder<'a> {
     table: &'a Table,
     partition_filter: Option<Predicate>,
     resources: Option<ResourceContext>,
     commit_user: String,
+    compact_blob: bool,
 }
 
 impl<'a> CompactBuilder<'a> {
@@ -65,6 +67,7 @@ impl<'a> CompactBuilder<'a> {
             partition_filter: None,
             resources: None,
             commit_user: uuid::Uuid::new_v4().to_string(),
+            compact_blob: false,
         }
     }
 
@@ -83,6 +86,14 @@ impl<'a> CompactBuilder<'a> {
         self
     }
 
+    /// Include dedicated Data Evolution BLOB files in planning.
+    /// Disabled by default because execution copies payloads. Cross-group BLOB
+    /// results require the normal merge in the same or an earlier commit.
+    pub fn with_blob_compaction(mut self, enabled: bool) -> Self {
+        self.compact_blob = enabled;
+        self
+    }
+
     pub fn with_commit_user(mut self, commit_user: impl Into<String>) -> 
Result<Self> {
         let commit_user = commit_user.into();
         validate_commit_user(&commit_user)?;
@@ -93,15 +104,21 @@ impl<'a> CompactBuilder<'a> {
     pub fn new_planner(&self) -> Result<CompactPlanner> {
         ensure_supported(self.table)?;
         let options = self.table.schema().core_options();
+        if self.compact_blob && !options.data_evolution_enabled() {
+            return Err(Error::Unsupported {
+                message: "Dedicated BLOB compaction requires a Data Evolution 
table".into(),
+            });
+        }
         if options.target_file_size() <= 0 {
             return Err(Error::ConfigInvalid {
                 message: "Compaction requires a positive 
target-file-size".into(),
             });
         }
         let kind = if options.data_evolution_enabled() {
-            
CompactPlannerKind::DataEvolution(data_evolution::DataEvolutionCompactPlanner::new(
-                &options,
-            )?)
+            CompactPlannerKind::DataEvolution(
+                data_evolution::DataEvolutionCompactPlanner::new(&options)?
+                    .with_blob_compaction(self.compact_blob),
+            )
         } else if self.table.schema().primary_keys().is_empty() {
             
CompactPlannerKind::Append(append::AppendCompactPlanner::new(&options)?)
         } else {
@@ -219,6 +236,7 @@ struct CompactContext {
 }
 
 /// An immutable, serializable set of independently executable compaction 
tasks.
+/// A BLOB result spanning normal groups must be published with or after their 
merge.
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct CompactPlan {
     snapshot_id: Option<i64>,
@@ -246,6 +264,9 @@ pub struct CompactTask {
     files: Vec<DataFileMeta>,
     #[serde(default)]
     output_level: Option<i32>,
+    /// Stable field ID for dedicated BLOB tasks; historical names can differ.
+    #[serde(default, skip_serializing_if = "Option::is_none")]
+    blob_field_id: Option<i32>,
 }
 
 impl CompactTask {
@@ -531,7 +552,7 @@ impl CompactExecutor {
             .get(&key)
             .map(Vec::as_slice)
             .unwrap_or_default();
-        task.validate_inputs(active)?;
+        task.validate_inputs(&self.table, active).await?;
         // validate_target proved the complete schema and branch are identical.
         // Preserve already resolved catalog schemas in the shared manager;
         // rebuilding it here would require REST-only schemas to exist on disk.
@@ -754,9 +775,16 @@ impl CompactTask {
         }
     }
 
-    fn validate_inputs(&self, active: &[ManifestEntry]) -> Result<()> {
+    async fn validate_inputs(&self, table: &Table, active: &[ManifestEntry]) 
-> Result<()> {
         if self.is_data_evolution() {
-            data_evolution::validate_inputs(&self.partition, self.bucket, 
&self.files, active)?;
+            data_evolution::validate_inputs(
+                table,
+                &self.partition,
+                self.bucket,
+                &self.files,
+                active,
+            )
+            .await?;
         }
         let bucket_files = active
             .iter()
@@ -810,6 +838,9 @@ impl CompactTask {
             ));
         }
         ensure_snapshot_supported(table, &self.context.snapshot)?;
+        if self.blob_field_id.is_some() && !self.is_data_evolution() {
+            return Err(invalid("BLOB compaction requires Data Evolution"));
+        }
         let incremental =
             self.is_primary_key() && 
primary_key::planner::enabled(&self.context.schema)?;
         // Legacy results may be recovered as already committed before their
@@ -844,7 +875,7 @@ impl CompactTask {
             }
         }
         if self.is_data_evolution() {
-            data_evolution::row_range(&self.files)?;
+            data_evolution::validate_task(self)?;
         }
         Ok(())
     }
diff --git a/crates/paimon/src/table/compact/append.rs 
b/crates/paimon/src/table/compact/append.rs
index 375b9dad..57b3b3e5 100644
--- a/crates/paimon/src/table/compact/append.rs
+++ b/crates/paimon/src/table/compact/append.rs
@@ -61,6 +61,7 @@ impl AppendCompactPlanner {
                     total_buckets,
                     files,
                     output_level: None,
+                    blob_field_id: None,
                 });
             }
         }
diff --git a/crates/paimon/src/table/compact/data_evolution.rs 
b/crates/paimon/src/table/compact/data_evolution.rs
index 340a8d51..7d04cae2 100644
--- a/crates/paimon/src/table/compact/data_evolution.rs
+++ b/crates/paimon/src/table/compact/data_evolution.rs
@@ -15,8 +15,9 @@
 // specific language governing permissions and limitations
 // under the License.
 
-//! Normal-file compaction, following Java DataEvolutionCompactCoordinator and
-//! DataEvolutionNormalCompactTask. Physical slots and logical deletions 
survive.
+//! Data Evolution compaction. Physical slots and logical deletions survive.
+
+mod blob;
 
 use std::collections::{BTreeMap, HashMap, HashSet};
 use std::sync::Arc;
@@ -32,6 +33,7 @@ use crate::spec::{
 };
 use crate::table::data_file_index_writer::FileIndexOptions;
 use crate::table::data_file_writer::DataFileWriter;
+use crate::table::dedicated_format_file_writer::is_blob_or_video_file_name;
 use crate::table::source::{data_evolution_anchor_file, 
is_data_evolution_normal_file};
 use crate::table::stats_filter::group_by_overlapping_row_id;
 use crate::table::{DataSplit, Table, TableScan};
@@ -74,7 +76,7 @@ pub(super) fn ensure_supported(table: &Table) -> Result<()> {
 }
 
 pub(super) fn validate_file(file: &DataFileMeta) -> Result<()> {
-    if !is_data_evolution_normal_file(file)
+    if (!is_data_evolution_normal_file(file) && !blob::is_blob(file))
         || file.file_size < 0
         || file.row_count <= 0
         || file.level != 0
@@ -89,18 +91,24 @@ pub(super) fn validate_file(file: &DataFileMeta) -> 
Result<()> {
                 .any(|name| crate::spec::is_row_tracking_column(name))
         })
     {
-        return Err(invalid("Data-evolution compaction requires normal files 
with valid row IDs, row counts and sequence bounds"));
+        return Err(invalid("Data-evolution compaction requires normal or BLOB 
files with valid row IDs, row counts and sequence bounds"));
     }
     Ok(())
 }
 
-/// Check alignment within each overlapping group and continuity between 
groups.
+/// Check contiguous row IDs, requiring aligned ranges for normal-file 
versions.
 pub(super) fn row_range(files: &[DataFileMeta]) -> Result<(i64, i64)> {
+    if files.first().is_some_and(blob::is_blob) {
+        return blob::row_range(files);
+    }
     let groups = group_by_overlapping_row_id(files.to_vec());
     let mut range: Option<(i64, i64)> = None;
     for group in groups {
         for file in &group {
             validate_file(file)?;
+            if !is_data_evolution_normal_file(file) {
+                return Err(invalid("Normal compaction cannot include dedicated 
files"));
+            }
         }
         let current = group[0]
             .row_id_range()
@@ -140,12 +148,13 @@ fn output_range(files: &[DataFileMeta], 
deletion_vectors_enabled: bool) -> Resul
     Ok((first, last))
 }
 
-/// Select complete normal-file groups and pack adjacent row-ID ranges.
+/// Select complete normal-file groups and optional BLOB tasks within their 
ranges.
 pub(super) struct DataEvolutionCompactPlanner {
     min_file_num: usize,
     target_file_size: i128,
     open_file_cost: i64,
     deletion_vectors_enabled: bool,
+    compact_blob: bool,
 }
 
 impl DataEvolutionCompactPlanner {
@@ -155,9 +164,15 @@ impl DataEvolutionCompactPlanner {
             target_file_size: i128::from(options.target_file_size()),
             open_file_cost: options.source_split_open_file_cost(),
             deletion_vectors_enabled: options.deletion_vectors_enabled(),
+            compact_blob: false,
         })
     }
 
+    pub(super) fn with_blob_compaction(mut self, enabled: bool) -> Self {
+        self.compact_blob = enabled;
+        self
+    }
+
     pub(super) async fn plan_tasks(
         &self,
         table: &Table,
@@ -166,8 +181,12 @@ impl DataEvolutionCompactPlanner {
         buckets: Option<&super::CompactBuckets>,
     ) -> Result<Vec<CompactTask>> {
         let mut groups = BucketFiles::new();
+        let mut blobs = BucketFiles::new();
+        if self.compact_blob {
+            blob::ensure_supported(&table.schema().core_options())?;
+        }
         // Read captured manifests rather than query providers so shadowed
-        // column versions are also included in each normal-file rewrite.
+        // column versions are also included in each rewrite.
         for entry in scan.plan_manifest_entries(&context.snapshot).await? {
             if buckets.is_some_and(|buckets| {
                 !buckets.contains(&(
@@ -179,6 +198,16 @@ impl DataEvolutionCompactPlanner {
                 continue;
             }
             if !is_data_evolution_normal_file(entry.file()) {
+                if self.compact_blob && 
is_blob_or_video_file_name(&entry.file().file_name) {
+                    blobs
+                        .entry((
+                            entry.partition().to_vec(),
+                            entry.bucket(),
+                            entry.total_buckets(),
+                        ))
+                        .or_default()
+                        .push(entry.file().clone());
+                }
                 continue;
             }
             validate_file(entry.file())?;
@@ -192,8 +221,17 @@ impl DataEvolutionCompactPlanner {
                 .push(entry.file().clone());
         }
         let mut tasks = Vec::new();
-        for ((partition, bucket, total_buckets), files) in groups {
-            for files in self.plan(files)? {
+        for (key, files) in groups {
+            let blob_files = blobs.remove(&key).unwrap_or_default();
+            let (partition, bucket, total_buckets) = key;
+            let (normal_tasks, blob_tasks) = if blob_files.is_empty() {
+                (self.plan(files)?, Vec::new())
+            } else {
+                let normal_tasks = self.plan(files.clone())?;
+                let blob_tasks = blob::plan(table, &files, &normal_tasks, 
blob_files).await?;
+                (normal_tasks, blob_tasks)
+            };
+            for files in normal_tasks {
                 validate_storage_layout(table, &files).await?;
                 tasks.push(CompactTask {
                     context: context.clone(),
@@ -203,6 +241,19 @@ impl DataEvolutionCompactPlanner {
                     total_buckets,
                     files,
                     output_level: None,
+                    blob_field_id: None,
+                });
+            }
+            for (field_id, files) in blob_tasks {
+                tasks.push(CompactTask {
+                    context: context.clone(),
+                    task_id: tasks.len(),
+                    partition: partition.clone(),
+                    bucket,
+                    total_buckets,
+                    files,
+                    output_level: None,
+                    blob_field_id: Some(field_id),
                 });
             }
         }
@@ -250,12 +301,16 @@ impl DataEvolutionCompactPlanner {
     }
 }
 
-pub(super) fn validate_inputs(
+pub(super) async fn validate_inputs(
+    table: &Table,
     partition: &[u8],
     bucket: i32,
     files: &[DataFileMeta],
     active: &[ManifestEntry],
 ) -> Result<()> {
+    if files.first().is_some_and(blob::is_blob) {
+        return blob::validate_inputs(table, partition, bucket, files, 
active).await;
+    }
     let (first, last) = row_range(files)?;
     let names = files
         .iter()
@@ -276,7 +331,8 @@ pub(super) fn validate_inputs(
     Ok(())
 }
 
-pub(in crate::table) fn validate_replacement_inputs(
+pub(in crate::table) async fn validate_replacement_inputs(
+    table: &Table,
     delta: &[ManifestEntry],
     active: &[ManifestEntry],
 ) -> Result<()> {
@@ -287,19 +343,38 @@ pub(in crate::table) fn validate_replacement_inputs(
         .iter()
         .filter(|entry| *entry.kind() == FileKind::Delete)
     {
+        let field_id = if blob::is_blob(entry.file()) {
+            Some(blob::input_field(table, entry.file()).await?.id())
+        } else {
+            None
+        };
         buckets
-            .entry((entry.partition().to_vec(), entry.bucket()))
+            .entry((entry.partition().to_vec(), entry.bucket(), field_id))
             .or_default()
             .push(entry.file().clone());
     }
-    for ((partition, bucket), files) in buckets {
+    for ((partition, bucket, _), files) in buckets {
         for group in group_by_overlapping_row_id(files) {
-            validate_inputs(&partition, bucket, &group, active)?;
+            validate_inputs(table, &partition, bucket, &group, active).await?;
         }
     }
+    blob::validate_replacement_outputs(table, delta).await?;
     Ok(())
 }
 
+pub(super) fn validate_task(task: &CompactTask) -> Result<()> {
+    if task.blob_field_id.is_some() {
+        blob::validate_task(task)
+    } else if task.files.iter().any(blob::is_blob) {
+        Err(invalid(
+            "BLOB compaction task is missing its field identity",
+        ))
+    } else {
+        row_range(&task.files)?;
+        Ok(())
+    }
+}
+
 fn normal_fields(schema: &crate::spec::TableSchema) -> Vec<DataField> {
     let options = schema.core_options();
     let inline = options.blob_inline_fields();
@@ -359,7 +434,7 @@ async fn input_fields(table: &Table, file: &DataFileMeta) 
-> Result<Vec<DataFiel
     }
 }
 
-/// A layout option can start writing VECTOR fields to dedicated files while
+/// A layout option can start writing BLOB or VECTOR fields to dedicated files 
while
 /// older normal files still contain inline values. Dropping those providers
 /// would turn readable values into NULL; migration requires a separate 
rewrite.
 pub(in crate::table) async fn validate_storage_layout(
@@ -380,7 +455,10 @@ pub(in crate::table) async fn validate_storage_layout(
     if dedicated.is_empty() {
         return Ok(());
     }
-    for file in files {
+    for file in files
+        .iter()
+        .filter(|file| is_data_evolution_normal_file(file))
+    {
         for field in input_fields(table, file).await? {
             if let Some(name) = dedicated.get(&field.id()) {
                 return Err(Error::Unsupported {
@@ -399,6 +477,9 @@ pub(super) async fn execute(
     partition_path: String,
     resources: Option<ResourceContext>,
 ) -> Result<Vec<DataFileMeta>> {
+    if task.blob_field_id.is_some() {
+        return blob::execute(table, task, split, partition_path, 
resources).await;
+    }
     validate_storage_layout(table, task.files()).await?;
     let (first, last) = output_range(
         task.files(),
@@ -485,6 +566,9 @@ pub(super) async fn execute(
 }
 
 pub(super) fn validate_outputs(task: &CompactTask, files: &[DataFileMeta]) -> 
Result<()> {
+    if task.blob_field_id.is_some() {
+        return blob::validate_outputs(task, files);
+    }
     let expected = output_range(
         &task.files,
         task.context
@@ -505,6 +589,7 @@ pub(super) fn validate_outputs(task: &CompactTask, files: 
&[DataFileMeta]) -> Re
         .max()
         .unwrap();
     if files.len() != 1
+        || !is_data_evolution_normal_file(&files[0])
         || files[0].row_id_range() != Some(expected)
         || files[0].min_sequence_number != min_sequence
         || files[0].max_sequence_number != max_sequence
@@ -589,7 +674,7 @@ mod tests {
     use super::*;
     use crate::spec::stats::BinaryTableStats;
 
-    fn file(name: &str, first: i64, rows: i64, bytes: i64) -> DataFileMeta {
+    pub(super) fn file(name: &str, first: i64, rows: i64, bytes: i64) -> 
DataFileMeta {
         DataFileMeta {
             file_name: name.into(),
             file_size: bytes,
diff --git a/crates/paimon/src/table/compact/data_evolution/blob.rs 
b/crates/paimon/src/table/compact/data_evolution/blob.rs
new file mode 100644
index 00000000..a9e37357
--- /dev/null
+++ b/crates/paimon/src/table/compact/data_evolution/blob.rs
@@ -0,0 +1,550 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Dedicated BLOB compaction following Java DataEvolutionBlobCompactTask.
+
+use std::collections::{BTreeMap, HashSet};
+
+use futures::TryStreamExt;
+
+use super::{input_fields, validate_file, validate_storage_layout};
+use crate::resource::ResourceContext;
+use crate::spec::{CoreOptions, DataField, DataFileMeta, FileKind, 
ManifestEntry};
+use crate::table::compact::{invalid, CompactTask};
+use crate::table::data_evolution_reader::read_blob_compaction;
+use crate::table::data_file_writer::DataFileWriter;
+use crate::table::dedicated_format_file_writer::is_blob_or_video_file_name;
+use crate::table::source::is_data_evolution_normal_file;
+use crate::table::stats_filter::group_by_overlapping_row_id;
+use crate::table::{DataSplit, Table};
+use crate::{Error, Result};
+
+pub(super) fn is_blob(file: &DataFileMeta) -> bool {
+    file.file_name.to_ascii_lowercase().ends_with(".blob")
+}
+
+pub(super) fn ensure_supported(options: &CoreOptions<'_>) -> Result<()> {
+    if options.blob_target_file_size() <= 0 {
+        return Err(Error::ConfigInvalid {
+            message: "BLOB compaction requires a positive 
blob.target-file-size".into(),
+        });
+    }
+    if !options.video_frame_fields().is_empty() {
+        return Err(Error::Unsupported {
+            message: "Data Evolution video-file compaction is not 
supported".into(),
+        });
+    }
+    Ok(())
+}
+
+pub(super) async fn input_field(table: &Table, file: &DataFileMeta) -> 
Result<DataField> {
+    if file.file_name.to_ascii_lowercase().ends_with(".video") {
+        return Err(Error::Unsupported {
+            message: "Data Evolution video-file compaction is not 
supported".into(),
+        });
+    }
+    validate_file(file)?;
+    if !is_blob(file) || file.write_cols.as_ref().is_none_or(|cols| cols.len() 
!= 1) {
+        return Err(invalid(
+            "BLOB compaction requires one write column per dedicated file",
+        ));
+    }
+    let mut fields = input_fields(table, file).await?;
+    if fields.len() != 1 || !fields[0].data_type().is_blob_file_field() {
+        return Err(invalid("Invalid BLOB compaction input field"));
+    }
+    Ok(fields.remove(0))
+}
+
+async fn validate_fields(table: &Table, files: &[DataFileMeta], field: 
&DataField) -> Result<()> {
+    for file in files {
+        let physical = input_field(table, file).await?;
+        if physical.id() != field.id() {
+            return Err(invalid(
+                "BLOB compaction field ID does not match its historical 
inputs",
+            ));
+        }
+        if physical.data_type() != field.data_type() {
+            return Err(Error::Unsupported {
+                message: "BLOB compaction cannot migrate field types".into(),
+            });
+        }
+    }
+    Ok(())
+}
+
+fn current_field(task: &CompactTask) -> Result<DataField> {
+    let inline = task.context.schema.core_options().blob_inline_fields();
+    task.context
+        .schema
+        .fields()
+        .iter()
+        .find(|field| {
+            Some(field.id()) == task.blob_field_id
+                && field.data_type().is_blob_file_field()
+                && !inline.contains(field.name())
+        })
+        .cloned()
+        .ok_or_else(|| invalid("BLOB compaction field is not a current 
dedicated BLOB field"))
+}
+
+pub(super) fn validate_task(task: &CompactTask) -> Result<()> {
+    ensure_supported(&task.context.schema.core_options())?;
+    if task.files.len() < 2 || !task.files.iter().all(is_blob) {
+        return Err(invalid(
+            "BLOB compaction requires at least two dedicated BLOB files",
+        ));
+    }
+    current_field(task)?;
+    row_range(&task.files)?;
+    Ok(())
+}
+
+/// Unlike normal files, BLOB versions may overlap only part of another file.
+pub(super) fn row_range(files: &[DataFileMeta]) -> Result<(i64, i64)> {
+    let mut ranges = Vec::with_capacity(files.len());
+    for file in files {
+        validate_file(file)?;
+        if !is_blob(file) {
+            return Err(invalid("BLOB compaction cannot include other file 
types"));
+        }
+        ranges.push(
+            file.row_id_range()
+                .ok_or_else(|| invalid("Missing BLOB row-ID range"))?,
+        );
+    }
+    ranges.sort_unstable();
+    let (first, mut last) = *ranges
+        .first()
+        .ok_or_else(|| invalid("Empty BLOB compaction range"))?;
+    for &(start, end) in &ranges[1..] {
+        if start > last + 1 {
+            return Err(invalid("BLOB compaction cannot cross a row-ID gap"));
+        }
+        last = last.max(end);
+    }
+    Ok((first, last))
+}
+
+pub(super) async fn plan(
+    table: &Table,
+    normal_files: &[DataFileMeta],
+    normal_tasks: &[Vec<DataFileMeta>],
+    files: Vec<DataFileMeta>,
+) -> Result<Vec<(i32, Vec<DataFileMeta>)>> {
+    let mut regions = normal_tasks
+        .iter()
+        .map(|files| super::row_range(files))
+        .collect::<Result<Vec<_>>>()?;
+    let selected = normal_tasks
+        .iter()
+        .flatten()
+        .map(|file| &file.file_name)
+        .collect::<HashSet<_>>();
+    for group in group_by_overlapping_row_id(normal_files.to_vec()) {
+        let range = super::row_range(&group)?;
+        if !selected.contains(&group[0].file_name) {
+            regions.push(range);
+        }
+    }
+    regions.sort_unstable();
+    let inline = table.schema().core_options().blob_inline_fields();
+    let dedicated_field_ids = table
+        .schema()
+        .fields()
+        .iter()
+        .filter(|field| field.data_type().is_blob_file_field() && 
!inline.contains(field.name()))
+        .map(DataField::id)
+        .collect::<HashSet<_>>();
+    let mut by_field = BTreeMap::<i32, Vec<DataFileMeta>>::new();
+    for file in files {
+        let field_id = input_field(table, &file).await?.id();
+        if dedicated_field_ids.contains(&field_id) {
+            by_field.entry(field_id).or_default().push(file);
+        }
+    }
+    let target_file_size = 
table.schema().core_options().blob_target_file_size();
+    let mut tasks = Vec::new();
+    for (field_id, files) in by_field {
+        let mut by_region = BTreeMap::<usize, Vec<DataFileMeta>>::new();
+        // Keep overlapping versions together so assigning the output's maximum
+        // sequence cannot change which value wins.
+        for group in group_by_overlapping_row_id(files) {
+            let (first, last) = row_range(&group)?;
+            if let Some(region) = regions
+                .partition_point(|&(start, _)| start <= first)
+                .checked_sub(1)
+            {
+                if regions[region].1 >= last {
+                    by_region.entry(region).or_default().extend(group);
+                }
+            }
+        }
+        for files in by_region.into_values() {
+            tasks.extend(
+                pack(files, target_file_size)?
+                    .into_iter()
+                    .map(|files| (field_id, files)),
+            );
+        }
+    }
+    Ok(tasks)
+}
+
+fn pack(files: Vec<DataFileMeta>, target_file_size: i64) -> 
Result<Vec<Vec<DataFileMeta>>> {
+    let mut tasks = Vec::new();
+    let mut pending = Vec::new();
+    let mut pending_size = 0i128;
+    let mut previous_end: Option<i64> = None;
+    let drain = |pending: &mut Vec<DataFileMeta>, tasks: &mut 
Vec<Vec<DataFileMeta>>| {
+        let files = std::mem::take(pending);
+        if files.len() >= 2 {
+            tasks.push(files);
+        }
+    };
+    for mut group in group_by_overlapping_row_id(files) {
+        group.sort_by(|a, b| {
+            (a.first_row_id, a.max_sequence_number, &a.file_name).cmp(&(
+                b.first_row_id,
+                b.max_sequence_number,
+                &b.file_name,
+            ))
+        });
+        let range = row_range(&group)?;
+        let large = group.len() == 1 && group[0].file_size >= target_file_size;
+        if large || previous_end.is_some_and(|end| end + 1 != range.0) {
+            drain(&mut pending, &mut tasks);
+            pending_size = 0;
+        }
+        previous_end = Some(range.1);
+        if large {
+            continue;
+        }
+        pending_size += group
+            .iter()
+            .map(|file| i128::from(file.file_size))
+            .sum::<i128>();
+        pending.extend(group);
+        if pending_size >= i128::from(target_file_size) && pending.len() >= 2 {
+            drain(&mut pending, &mut tasks);
+            pending_size = 0;
+        }
+    }
+    drain(&mut pending, &mut tasks);
+    Ok(tasks)
+}
+
+pub(super) async fn validate_inputs(
+    table: &Table,
+    partition: &[u8],
+    bucket: i32,
+    files: &[DataFileMeta],
+    active: &[ManifestEntry],
+) -> Result<()> {
+    let (first, last) = row_range(files)?;
+    let expected_field_id = input_field(table, &files[0]).await?.id();
+    for file in &files[1..] {
+        if input_field(table, file).await?.id() != expected_field_id {
+            return Err(invalid(
+                "BLOB compaction inputs must have the same field ID",
+            ));
+        }
+    }
+    let names = files
+        .iter()
+        .map(|file| &file.file_name)
+        .collect::<HashSet<_>>();
+    let normals = active
+        .iter()
+        .filter(|entry| {
+            entry.partition() == partition
+                && entry.bucket() == bucket
+                && is_data_evolution_normal_file(entry.file())
+                && entry
+                    .file()
+                    .row_id_range()
+                    .is_some_and(|(start, end)| start <= last && end >= first)
+        })
+        .map(|entry| entry.file().clone())
+        .collect::<Vec<_>>();
+    validate_storage_layout(table, &normals).await?;
+    for entry in active.iter().filter(|entry| {
+        entry.partition() == partition
+            && entry.bucket() == bucket
+            && is_blob_or_video_file_name(&entry.file().file_name)
+            && entry
+                .file()
+                .row_id_range()
+                .is_some_and(|(start, end)| start <= last && end >= first)
+    }) {
+        if !names.contains(&entry.file().file_name)
+            && input_field(table, entry.file()).await?.id() == 
expected_field_id
+        {
+            return Err(invalid(
+                "BLOB compaction inputs changed or omit overlapping field 
versions",
+            ));
+        }
+    }
+    Ok(())
+}
+
+pub(super) async fn execute(
+    table: &Table,
+    task: &CompactTask,
+    split: &DataSplit,
+    partition_path: String,
+    resources: Option<ResourceContext>,
+) -> Result<Vec<DataFileMeta>> {
+    let field = current_field(task)?;
+    validate_fields(table, &task.files, &field).await?;
+    let (first, last) = row_range(&task.files)?;
+    let options = table.schema().core_options();
+    let mut batches = read_blob_compaction(
+        split,
+        field.clone(),
+        table.file_io().clone(),
+        first,
+        last,
+        options.read_batch_size()?,
+    )?;
+    let mut writer = DataFileWriter::new(
+        table.file_io().clone(),
+        table.location().to_string(),
+        partition_path,
+        task.bucket,
+        table.schema().id(),
+        i64::MAX,
+        "none".into(),
+        0,
+        options.write_buffer_size()? as i64,
+        "blob".into(),
+        vec![field.clone()],
+        table.schema().options().clone(),
+        Some(1),
+        Some(first),
+        Some(vec![field.name().into()]),
+    )?
+    .with_resources(resources);
+    let min_sequence = task
+        .files
+        .iter()
+        .map(|file| file.min_sequence_number)
+        .min()
+        .unwrap();
+    let max_sequence = task
+        .files
+        .iter()
+        .map(|file| file.max_sequence_number)
+        .max()
+        .unwrap();
+    let sequences = column_sequences(&task.files, max_sequence);
+    let result = async {
+        let mut row_count = 0i64;
+        while let Some(batch) = batches.try_next().await? {
+            row_count += batch.num_rows() as i64;
+            writer.write(&batch).await?;
+        }
+        if row_count != last - first + 1 {
+            return Err(invalid("BLOB compaction row count changed"));
+        }
+        let mut files = writer.prepare_commit().await?;
+        for file in &mut files {
+            file.min_sequence_number = min_sequence;
+            file.max_sequence_number = max_sequence;
+            file.column_max_sequence_numbers = sequences.clone();
+        }
+        validate_outputs(task, &files)?;
+        Ok(files)
+    }
+    .await;
+    if result.is_err() {
+        writer.abort().await;
+    }
+    result
+}
+
+pub(super) fn validate_outputs(task: &CompactTask, files: &[DataFileMeta]) -> 
Result<()> {
+    let field = current_field(task)?;
+    let min_sequence = task
+        .files
+        .iter()
+        .map(|file| file.min_sequence_number)
+        .min()
+        .unwrap();
+    let max_sequence = task
+        .files
+        .iter()
+        .map(|file| file.max_sequence_number)
+        .max()
+        .unwrap();
+    if files.len() != 1
+        || !is_blob(&files[0])
+        || files[0].row_id_range() != Some(row_range(&task.files)?)
+        || files[0].min_sequence_number != min_sequence
+        || files[0].max_sequence_number != max_sequence
+        || files[0].column_max_sequence_numbers != 
column_sequences(&task.files, max_sequence)
+        || files[0].write_cols != Some(vec![field.name().into()])
+    {
+        return Err(invalid("BLOB compaction must preserve its row-ID range, 
field and sequence bounds in one output"));
+    }
+    Ok(())
+}
+
+fn column_sequences(files: &[DataFileMeta], max_sequence: i64) -> 
Option<Vec<i64>> {
+    let sequence = files
+        .iter()
+        .map(|file| {
+            file.column_max_sequence_numbers
+                .as_ref()
+                .filter(|values| values.len() == 1)
+                .map(|values| values[0])
+                .filter(|value| *value > 0 && *value <= 
file.max_sequence_number)
+                .unwrap_or(file.max_sequence_number)
+        })
+        .max()
+        .unwrap();
+    (sequence != max_sequence).then_some(vec![sequence])
+}
+
+/// Re-resolve field identities and types at publication because serialized
+/// worker results may mislabel historical inputs.
+pub(super) async fn validate_replacement_outputs(
+    table: &Table,
+    delta: &[ManifestEntry],
+) -> Result<()> {
+    let mut deleted = BTreeMap::<_, Vec<DataFileMeta>>::new();
+    for entry in delta
+        .iter()
+        .filter(|entry| *entry.kind() == FileKind::Delete && 
is_blob(entry.file()))
+    {
+        let field_id = input_field(table, entry.file()).await?.id();
+        deleted
+            .entry((entry.partition().to_vec(), entry.bucket(), field_id))
+            .or_default()
+            .push(entry.file().clone());
+    }
+    let mut consumed = HashSet::new();
+    for entry in delta
+        .iter()
+        .filter(|entry| *entry.kind() == FileKind::Add && 
is_blob(entry.file()))
+    {
+        let field = input_field(table, entry.file()).await?;
+        let range = row_range(std::slice::from_ref(entry.file()))?;
+        let inputs = deleted
+            .get(&(entry.partition().to_vec(), entry.bucket(), field.id()))
+            .ok_or_else(|| invalid("BLOB output does not replace the same 
field ID"))?
+            .iter()
+            .filter(|file| {
+                file.row_id_range()
+                    .is_some_and(|(start, end)| start <= range.1 && end >= 
range.0)
+            })
+            .cloned()
+            .collect::<Vec<_>>();
+        validate_fields(table, &inputs, &field).await?;
+        let min_sequence = inputs.iter().map(|file| 
file.min_sequence_number).min();
+        let max_sequence = inputs.iter().map(|file| 
file.max_sequence_number).max();
+        if inputs.len() < 2
+            || row_range(&inputs)? != range
+            || Some(entry.file().min_sequence_number) != min_sequence
+            || Some(entry.file().max_sequence_number) != max_sequence
+            || entry.file().column_max_sequence_numbers
+                != column_sequences(&inputs, max_sequence.unwrap())
+        {
+            return Err(invalid(
+                "BLOB replacement changed field ranges or sequence metadata",
+            ));
+        }
+        for input in inputs {
+            if !consumed.insert((entry.partition().to_vec(), entry.bucket(), 
input.file_name)) {
+                return Err(invalid("BLOB replacement outputs overlap"));
+            }
+        }
+    }
+    if consumed.len() != deleted.values().map(Vec::len).sum::<usize>() {
+        return Err(invalid(
+            "BLOB compaction must replace every selected field range",
+        ));
+    }
+    Ok(())
+}
+
+#[cfg(test)]
+mod tests {
+    use super::super::tests::file;
+    use super::*;
+
+    #[test]
+    fn java_blob_target_size_boundaries_keep_overlap_groups_intact() {
+        let files = [400, 400, 1024, 512, 512, 600, 600, 400, 500]
+            .into_iter()
+            .enumerate()
+            .map(|(i, bytes)| file(&format!("{i}.blob"), i as i64 * 10, 10, 
bytes))
+            .collect();
+        let tasks = pack(files, 1024).unwrap();
+        assert_eq!(
+            tasks
+                .iter()
+                .map(|files| row_range(files).unwrap())
+                .collect::<Vec<_>>(),
+            vec![(0, 19), (30, 49), (50, 69), (70, 89)]
+        );
+        let mut update = file("update.blob", 5, 10, 1);
+        update.max_sequence_number = 2;
+        let tasks = pack(vec![file("base.blob", 0, 20, 2048), update], 
1024).unwrap();
+        assert_eq!(
+            tasks.len(),
+            1,
+            "a large baseline and its overlapping delta stay together"
+        );
+        assert_eq!(tasks[0].len(), 2);
+        assert_eq!(row_range(&tasks[0]).unwrap(), (0, 19));
+    }
+
+    #[test]
+    fn blob_gaps_singletons_and_invalid_ranges() {
+        let tasks = pack(
+            vec![
+                file("a.blob", 0, 2, 1),
+                file("b.blob", 2, 2, 1),
+                file("c.blob", 5, 2, 1),
+                file("d.blob", 7, 2, 1),
+            ],
+            1024,
+        )
+        .unwrap();
+        assert_eq!(
+            tasks
+                .iter()
+                .map(|files| row_range(files).unwrap())
+                .collect::<Vec<_>>(),
+            vec![(0, 3), (5, 8)]
+        );
+        assert!(
+            pack(vec![file("a.blob", 0, 2, 1), file("b.blob", 4, 2, 1)], 1024)
+                .unwrap()
+                .is_empty()
+        );
+        assert!(pack(
+            vec![file("a.blob", 0, 2, 1024), file("b.blob", 2, 2, 1)],
+            1024
+        )
+        .unwrap()
+        .is_empty());
+        assert!(row_range(&[file("overflow.blob", i64::MAX, 1, 1)]).is_err());
+        assert!(row_range(&[file("a.blob", 0, 2, 1), file("b.blob", 3, 2, 
1)]).is_err());
+    }
+}
diff --git a/crates/paimon/src/table/compact/deletion_vectors.rs 
b/crates/paimon/src/table/compact/deletion_vectors.rs
index 0f79681f..9fc5e826 100644
--- a/crates/paimon/src/table/compact/deletion_vectors.rs
+++ b/crates/paimon/src/table/compact/deletion_vectors.rs
@@ -59,6 +59,11 @@ pub(in crate::table) async fn rewrite_indexes(
         ),
     >::new();
     for entry in delta {
+        // Dedicated files never anchor deletion vectors. In a mixed commit,
+        // remap positions only between the replaced normal files.
+        if data_evolution && 
!crate::table::source::is_data_evolution_normal_file(entry.file()) {
+            continue;
+        }
         let bucket = buckets
             .entry((entry.partition().to_vec(), entry.bucket()))
             .or_default();
diff --git a/crates/paimon/src/table/compact/primary_key.rs 
b/crates/paimon/src/table/compact/primary_key.rs
index 814308a3..16d827b3 100644
--- a/crates/paimon/src/table/compact/primary_key.rs
+++ b/crates/paimon/src/table/compact/primary_key.rs
@@ -86,6 +86,7 @@ impl PrimaryKeyCompactPlanner {
                         total_buckets,
                         files,
                         output_level: Some(output_level),
+                        blob_field_id: None,
                     });
                 }
                 continue;
@@ -118,6 +119,7 @@ impl PrimaryKeyCompactPlanner {
                     total_buckets,
                     files,
                     output_level: None,
+                    blob_field_id: None,
                 });
             }
         }
diff --git a/crates/paimon/src/table/data_evolution_reader.rs 
b/crates/paimon/src/table/data_evolution_reader.rs
index 583feb82..45ebb85b 100644
--- a/crates/paimon/src/table/data_evolution_reader.rs
+++ b/crates/paimon/src/table/data_evolution_reader.rs
@@ -105,6 +105,35 @@ fn reader_file_groups(files: &[DataFileMeta]) -> 
Vec<Vec<DataFileMeta>> {
     }
 }
 
+/// Read one validated BLOB compaction range without a normal-file anchor or
+/// deletion filtering. Descriptors let the writer stream the payload copies.
+pub(super) fn read_blob_compaction(
+    split: &DataSplit,
+    field: DataField,
+    file_io: FileIO,
+    first: i64,
+    last: i64,
+    batch_size: usize,
+) -> crate::Result<ArrowRecordBatchStream> {
+    let mut bunch = BlobBunch::new(first, last - first + 1);
+    for file in split.data_files() {
+        bunch.add(file.clone())?;
+    }
+    bunch.finalize()?;
+    bunch.validate_logical_range()?;
+    blob_fallback::read(
+        split,
+        bunch,
+        vec![field],
+        None,
+        Some(batch_size),
+        file_io,
+        true,
+        DEFAULT_BLOB_READ_PARALLELISM,
+        None,
+    )
+}
+
 /// Reads data files in data evolution mode, merging columns from files
 /// that share the same logical row range.
 pub(crate) struct DataEvolutionReader {
@@ -2934,7 +2963,8 @@ impl BlobBunch {
 
         blob_file_row_range(&file)?;
         if let Some(first_file) = self.files.first() {
-            if file.write_cols != first_file.write_cols {
+            // Sources are grouped by field ID; names can differ across 
schemas.
+            if file.schema_id == first_file.schema_id && file.write_cols != 
first_file.write_cols {
                 return Err(Error::DataInvalid {
                     message: "All files in a blob bunch should have the same 
write columns."
                         .to_string(),
diff --git a/crates/paimon/src/table/table_commit.rs 
b/crates/paimon/src/table/table_commit.rs
index 1e5cf5c2..73f1fcb9 100644
--- a/crates/paimon/src/table/table_commit.rs
+++ b/crates/paimon/src/table/table_commit.rs
@@ -2135,9 +2135,11 @@ impl TableCommit {
                         .collect::<HashSet<_>>();
                     if self.data_evolution_enabled {
                         
super::compact::data_evolution::validate_replacement_inputs(
+                            &self.table,
                             entries,
                             &captured_files,
-                        )?;
+                        )
+                        .await?;
                         
super::compact::data_evolution::validate_storage_layout(
                             &self.table,
                             &deletes
@@ -2210,9 +2212,11 @@ impl TableCommit {
                 }
                 if self.data_evolution_enabled {
                     
super::compact::data_evolution::validate_replacement_inputs(
+                        &self.table,
                         entries,
                         base_data_files.as_deref().unwrap_or_default(),
-                    )?;
+                    )
+                    .await?;
                 }
                 self.check_compact_lsm_conflicts(
                     base_data_files.as_deref().unwrap_or_default(),
diff --git a/crates/paimon/src/table/table_commit/parity_tests.rs 
b/crates/paimon/src/table/table_commit/parity_tests.rs
index 54e90d37..6f5c1024 100644
--- a/crates/paimon/src/table/table_commit/parity_tests.rs
+++ b/crates/paimon/src/table/table_commit/parity_tests.rs
@@ -358,23 +358,45 @@ async fn 
publication_errors_retry_without_duplicate_snapshots() {
 }
 
 #[tokio::test]
-async fn 
data_evolution_compact_retries_preserve_concurrent_deletes_and_published_vectors()
 {
-    use arrow_array::{Int32Array, RecordBatch};
+async fn 
data_evolution_compact_retries_preserve_concurrent_changes_and_published_files()
 {
+    use arrow_array::{Int32Array, Int64Array, LargeBinaryArray, RecordBatch};
     use futures::TryStreamExt;
 
+    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
+    enum Race {
+        Delete,
+        BlobUpdate,
+        Publish,
+        PublishThenDelete,
+    }
+
     async fn dv_paths(table: &Table, snapshot: &Snapshot) -> 
Result<Vec<String>> {
-        let entries = IndexManifest::read(table.file_io(), 
&table.snapshot_manager().manifest_path(snapshot.index_manifest().unwrap())).await?;
+        let entries = IndexManifest::read(
+            table.file_io(),
+            &table
+                .snapshot_manager()
+                .manifest_path(snapshot.index_manifest().unwrap()),
+        )
+        .await?;
         let commit = table.new_write_builder().new_commit();
-        entries.into_iter().filter(|entry| entry.index_file.index_type == 
DELETION_VECTORS_INDEX_TYPE).map(|entry| {
-            Ok(committed_index_file_path(table.location(), 
&commit.bucket_path(&entry.partition, entry.bucket)?, 
table.schema().core_options().index_file_in_data_file_dir(), &entry.index_file))
-        }).collect()
+        entries
+            .into_iter()
+            .filter(|entry| entry.index_file.index_type == 
DELETION_VECTORS_INDEX_TYPE)
+            .map(|entry| {
+                Ok(committed_index_file_path(
+                    table.location(),
+                    &commit.bucket_path(&entry.partition, entry.bucket)?,
+                    
table.schema().core_options().index_file_in_data_file_dir(),
+                    &entry.index_file,
+                ))
+            })
+            .collect()
     }
 
     struct RacingCompactCommit {
         table: Table,
         calls: std::sync::atomic::AtomicUsize,
-        publish_first: bool,
-        delete_after_publish: bool,
+        race: Race,
         paths: std::sync::Mutex<Vec<Vec<String>>>,
     }
 
@@ -390,92 +412,307 @@ async fn 
data_evolution_compact_retries_preserve_concurrent_deletes_and_publishe
             let paths = dv_paths(&self.table, snapshot).await?;
             self.paths.lock().unwrap().push(paths);
             if self.calls.fetch_add(1, std::sync::atomic::Ordering::SeqCst) == 
0 {
-                if self.publish_first {
-                    
assert!(self.table.snapshot_manager().commit_snapshot(snapshot).await?);
-                    if self.delete_after_publish {
-                        // The retry must find its successful COMPACT even when
-                        // a newer DELETE has already replaced the migrated DV.
+                let publish_first = matches!(self.race, Race::Publish | 
Race::PublishThenDelete);
+                if publish_first {
+                    assert!(
+                        self.table
+                            .snapshot_manager()
+                            .commit_snapshot(snapshot)
+                            .await?
+                    );
+                }
+                match self.race {
+                    Race::Delete | Race::PublishThenDelete => {
                         let mut delete = 
crate::table::DataEvolutionDeleteWriter::new(&self.table)?;
                         delete.add_row_ids([2])?;
-                        
self.table.new_write_builder().new_commit().commit(delete.prepare_commit().await?).await?;
+                        self.table
+                            .new_write_builder()
+                            .new_commit()
+                            .commit(delete.prepare_commit().await?)
+                            .await?;
                     }
-                    return Err(crate::Error::IoUnsupported { message: "lost 
compact response".into() });
+                    Race::BlobUpdate => {
+                        let builder = self.table.new_write_builder();
+                        let messages = builder
+                            .new_update()?
+                            
.update_by_arrow_with_row_id(vec![RecordBatch::try_from_iter([
+                                (
+                                    "_ROW_ID",
+                                    Arc::new(Int64Array::from(vec![2])) as 
arrow_array::ArrayRef,
+                                ),
+                                (
+                                    "payload",
+                                    Arc::new(LargeBinaryArray::from(vec![Some(
+                                        b"concurrent".as_slice(),
+                                    )]))
+                                        as arrow_array::ArrayRef,
+                                ),
+                            ])
+                            .unwrap()])
+                            .await?;
+                        builder.new_commit().commit(messages).await?;
+                    }
+                    Race::Publish => {}
+                }
+                if publish_first {
+                    return Err(crate::Error::IoUnsupported {
+                        message: "lost compact response".into(),
+                    });
                 }
-                // Commit another DELETE after compact prepared its DV file,
-                // then force its CAS to lose. Retry must remap the newer DV.
-                let mut delete = 
crate::table::DataEvolutionDeleteWriter::new(&self.table)?;
-                delete.add_row_ids([2])?;
-                
self.table.new_write_builder().new_commit().commit(delete.prepare_commit().await?).await?;
                 return Ok(false);
             }
-            self.table.snapshot_manager().commit_snapshot(snapshot).await
+            self.table
+                .snapshot_manager()
+                .commit_snapshot(snapshot)
+                .await
         }
     }
 
-    for (publish_first, delete_after_publish) in [(false, false), (true, 
false), (true, true)] {
+    for (compact_blob, race) in [
+        (false, Race::Delete),
+        (false, Race::BlobUpdate),
+        (false, Race::Publish),
+        (false, Race::PublishThenDelete),
+        (true, Race::Delete),
+        (true, Race::BlobUpdate),
+        (true, Race::Publish),
+        (true, Race::PublishThenDelete),
+    ] {
+        let publish_first = matches!(race, Race::Publish | 
Race::PublishThenDelete);
+        let conflicts = compact_blob && race == Race::BlobUpdate;
         let io = test_file_io();
-        let path = 
format!("memory:/de-compact-cas-{publish_first}-{delete_after_publish}");
+        let path = format!("memory:/de-compact-cas-{compact_blob}-{race:?}");
         setup_dirs(&io, &path).await;
         let schema = crate::spec::Schema::builder()
             .column("id", DataType::Int(crate::spec::IntType::new()))
+            .column("payload", DataType::Blob(crate::spec::BlobType::new()))
             .option("row-tracking.enabled", "true")
             .option("data-evolution.enabled", "true")
             .option("deletion-vectors.enabled", "true")
             .option("compaction.min.file-num", "2")
             .option("write-only", "true")
-            .build().unwrap();
-        let table = Table::new(io.clone(), Identifier::new("default", 
"de_compact_cas"), path.clone(), TableSchema::new(0, &schema), None);
+            .build()
+            .unwrap();
+        let table = Table::new(
+            io.clone(),
+            Identifier::new("default", "de_compact_cas"),
+            path.clone(),
+            TableSchema::new(0, &schema),
+            None,
+        );
         io.mkdirs(&format!("{path}/schema")).await.unwrap();
-        
io.new_output(&format!("{path}/schema/schema-0")).unwrap().write(serde_json::to_vec(table.schema()).unwrap().into()).await.unwrap();
+        io.new_output(&format!("{path}/schema/schema-0"))
+            .unwrap()
+            .write(serde_json::to_vec(table.schema()).unwrap().into())
+            .await
+            .unwrap();
         for ids in [vec![0, 1], vec![2, 3]] {
             let builder = table.new_write_builder();
             let mut write = builder.new_write().unwrap();
-            write.write_arrow_batch(&RecordBatch::try_from_iter([("id", 
Arc::new(Int32Array::from(ids)) as 
arrow_array::ArrayRef)]).unwrap()).await.unwrap();
-            
builder.new_commit().commit(write.prepare_commit().await.unwrap()).await.unwrap();
+            let payloads = 
LargeBinaryArray::from(vec![Some(b"payload".as_slice()); ids.len()]);
+            write
+                .write_arrow_batch(
+                    &RecordBatch::try_from_iter([
+                        (
+                            "id",
+                            Arc::new(Int32Array::from(ids)) as 
arrow_array::ArrayRef,
+                        ),
+                        ("payload", Arc::new(payloads) as 
arrow_array::ArrayRef),
+                    ])
+                    .unwrap(),
+                )
+                .await
+                .unwrap();
+            builder
+                .new_commit()
+                .commit(write.prepare_commit().await.unwrap())
+                .await
+                .unwrap();
         }
         let mut delete = 
crate::table::DataEvolutionDeleteWriter::new(&table).unwrap();
         delete.add_row_ids([1]).unwrap();
-        
table.new_write_builder().new_commit().commit(delete.prepare_commit().await.unwrap()).await.unwrap();
-        let captured = 
table.snapshot_manager().get_latest_snapshot().await.unwrap().unwrap();
+        table
+            .new_write_builder()
+            .new_commit()
+            .commit(delete.prepare_commit().await.unwrap())
+            .await
+            .unwrap();
+        let captured = table
+            .snapshot_manager()
+            .get_latest_snapshot()
+            .await
+            .unwrap()
+            .unwrap();
         let original_paths = dv_paths(&table, &captured).await.unwrap();
-        let builder = table.new_compact_builder();
+        let builder = table
+            .new_compact_builder()
+            .with_blob_compaction(compact_blob);
         let plan = builder.new_planner().unwrap().plan().await.unwrap();
-        let result = 
builder.new_executor().unwrap().execute(&plan.tasks()[0]).await.unwrap();
+        assert_eq!(plan.tasks().len(), if compact_blob { 2 } else { 1 });
+        let executor = builder.new_executor().unwrap();
+        let mut results = Vec::new();
+        for task in plan.tasks() {
+            results.push(executor.execute(task).await.unwrap());
+        }
         let publisher = Arc::new(RacingCompactCommit {
-            table: table.clone(), calls: 
std::sync::atomic::AtomicUsize::new(0), publish_first, delete_after_publish,
+            table: table.clone(),
+            calls: std::sync::atomic::AtomicUsize::new(0),
+            race,
             paths: std::sync::Mutex::new(Vec::new()),
         });
         let mut commit = builder.new_commit().unwrap();
         commit.snapshot_commit = publisher.clone();
         commit.commit_min_retry_wait_ms = 0;
         commit.commit_max_retry_wait_ms = 0;
-        let metrics = 
commit.commit_compact(vec![result.clone()]).await.unwrap();
-        assert_eq!(publisher.calls.load(std::sync::atomic::Ordering::SeqCst), 
if publish_first { 1 } else { 2 });
-        let after = 
table.snapshot_manager().get_latest_snapshot().await.unwrap().unwrap();
-        assert_eq!(after.id(), if publish_first && !delete_after_publish { 4 } 
else { 5 });
-        assert_eq!(after.commit_kind(), if delete_after_publish { 
&CommitKind::OVERWRITE } else { &CommitKind::COMPACT });
+        let outcome = commit.commit_compact(results.clone()).await;
+        assert_eq!(
+            publisher.calls.load(std::sync::atomic::Ordering::SeqCst),
+            if publish_first || conflicts { 1 } else { 2 }
+        );
+        let after = table
+            .snapshot_manager()
+            .get_latest_snapshot()
+            .await
+            .unwrap()
+            .unwrap();
+        assert_eq!(
+            after.id(),
+            if race == Race::Publish || conflicts {
+                4
+            } else {
+                5
+            }
+        );
+        let expected_kind = if conflicts {
+            CommitKind::APPEND
+        } else if race == Race::PublishThenDelete {
+            CommitKind::OVERWRITE
+        } else {
+            CommitKind::COMPACT
+        };
+        assert_eq!(after.commit_kind(), &expected_kind);
         let attempts = publisher.paths.lock().unwrap().clone();
         assert_eq!(attempts[0].len(), 1);
         assert!(!original_paths.contains(&attempts[0][0]));
-        assert_eq!(io.exists(&attempts[0][0]).await.unwrap(), publish_first,
-            "CAS false must remove its unpublished DV; publish-then-error must 
retain it");
+        assert_eq!(
+            io.exists(&attempts[0][0]).await.unwrap(),
+            publish_first,
+            "CAS false must remove its unpublished DV; publish-then-error must 
retain it"
+        );
         let current_paths = dv_paths(&table, &after).await.unwrap();
-        for path in 
original_paths.iter().chain(attempts.last().unwrap()).chain(&current_paths) {
-            assert!(io.exists(path).await.unwrap(), "deleted old-snapshot or 
published DV: {path}");
+        for path in original_paths.iter().chain(&current_paths) {
+            assert!(
+                io.exists(path).await.unwrap(),
+                "deleted old-snapshot or published DV: {path}"
+            );
+        }
+        if conflicts {
+            let error = outcome.unwrap_err();
+            assert!(error.to_string().contains("omit overlapping"), "{error}");
+            assert_eq!(current_paths, original_paths);
+        } else {
+            let metrics = outcome.unwrap();
+            for path in attempts.last().unwrap() {
+                assert!(
+                    io.exists(path).await.unwrap(),
+                    "deleted published DV: {path}"
+                );
+            }
+            assert_eq!(
+                commit.commit_compact(results.clone()).await.unwrap(),
+                metrics
+            );
+            io.delete_file(
+                &table
+                    .snapshot_manager()
+                    .snapshot_path(plan.snapshot_id().unwrap()),
+            )
+            .await
+            .unwrap();
+            let recovered = table
+                .new_compact_builder()
+                .with_commit_user(commit.commit_user.clone())
+                .unwrap()
+                .new_commit()
+                .unwrap();
+            assert_eq!(
+                recovered.commit_compact(results.clone()).await.unwrap(),
+                metrics
+            );
+        }
+        for file in results.iter().flat_map(|result| result.files()) {
+            assert!(
+                io.exists(&format!("{path}/bucket-0/{}", file.file_name))
+                    .await
+                    .unwrap(),
+                "deleted submitted output: {}",
+                file.file_name
+            );
         }
-        assert_eq!(commit.commit_compact(vec![result.clone()]).await.unwrap(), 
metrics);
-        // Recovery after coordinator restart must not need the captured source
-        // snapshot once the COMPACT identity is already present in history.
-        
io.delete_file(&table.snapshot_manager().snapshot_path(plan.snapshot_id().unwrap())).await.unwrap();
-        let recovered = 
table.new_compact_builder().with_commit_user(commit.commit_user.clone()).unwrap().new_commit().unwrap();
-        assert_eq!(recovered.commit_compact(vec![result]).await.unwrap(), 
metrics);
-        
assert_eq!(table.snapshot_manager().get_latest_snapshot_id().await.unwrap(), 
Some(after.id()));
+        assert_eq!(
+            table
+                .snapshot_manager()
+                .get_latest_snapshot_id()
+                .await
+                .unwrap(),
+            Some(after.id())
+        );
         let read = table.new_read_builder();
         let scan = read.new_scan().plan().await.unwrap();
-        let batches: Vec<RecordBatch> = 
read.new_read().unwrap().to_arrow(scan.splits()).unwrap().try_collect().await.unwrap();
-        let mut ids = batches.iter().flat_map(|batch| 
batch.column(0).as_any().downcast_ref::<Int32Array>().unwrap().values().iter().copied()).collect::<Vec<_>>();
+        let batches: Vec<RecordBatch> = read
+            .new_read()
+            .unwrap()
+            .to_arrow(scan.splits())
+            .unwrap()
+            .try_collect()
+            .await
+            .unwrap();
+        for batch in &batches {
+            let ids = batch
+                .column_by_name("id")
+                .unwrap()
+                .as_any()
+                .downcast_ref::<Int32Array>()
+                .unwrap();
+            let payloads = batch
+                .column_by_name("payload")
+                .unwrap()
+                .as_any()
+                .downcast_ref::<LargeBinaryArray>()
+                .unwrap();
+            for (id, value) in ids.values().iter().zip(payloads.iter()) {
+                assert_eq!(
+                    value,
+                    Some(if race == Race::BlobUpdate && *id == 2 {
+                        b"concurrent".as_slice()
+                    } else {
+                        b"payload".as_slice()
+                    })
+                );
+            }
+        }
+        let mut ids = batches
+            .iter()
+            .flat_map(|batch| {
+                batch
+                    .column(0)
+                    .as_any()
+                    .downcast_ref::<Int32Array>()
+                    .unwrap()
+                    .values()
+                    .iter()
+                    .copied()
+            })
+            .collect::<Vec<_>>();
         ids.sort_unstable();
-        assert_eq!(ids, if publish_first && !delete_after_publish { vec![0, 2, 
3] } else { vec![0, 3] });
+        assert_eq!(
+            ids,
+            if matches!(race, Race::Publish | Race::BlobUpdate) {
+                vec![0, 2, 3]
+            } else {
+                vec![0, 3]
+            }
+        );
     }
 }
 
diff --git a/crates/paimon/tests/blob_update/compaction.rs 
b/crates/paimon/tests/blob_update/compaction.rs
new file mode 100644
index 00000000..1c10bebd
--- /dev/null
+++ b/crates/paimon/tests/blob_update/compaction.rs
@@ -0,0 +1,1180 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use super::*;
+use paimon::spec::{IndexManifest, IndexManifestEntry, SchemaChange};
+use paimon::table::{
+    CommitCallback, CommitCallbackContext, CompactPlan, CompactResult, 
DataEvolutionDeleteWriter,
+};
+
+async fn compact_plan(table: &Table) -> CompactPlan {
+    let plan = table
+        .new_compact_builder()
+        .with_blob_compaction(true)
+        .new_planner()
+        .unwrap()
+        .plan()
+        .await
+        .unwrap();
+    serde_json::from_slice(&serde_json::to_vec(&plan).unwrap()).unwrap()
+}
+
+async fn execute(table: &Table, plan: &CompactPlan) -> Vec<CompactResult> {
+    let executor = table.new_compact_builder().new_executor().unwrap();
+    let mut results = Vec::new();
+    for task in plan.tasks() {
+        results.push(executor.execute(task).await.unwrap());
+    }
+    serde_json::from_slice(&serde_json::to_vec(&results).unwrap()).unwrap()
+}
+
+async fn update(table: &Table, id: i64, value: Option<&[u8]>) {
+    let messages = apply(table, matched(vec![id], vec![value])).await;
+    table
+        .new_write_builder()
+        .new_commit()
+        .commit(messages)
+        .await
+        .unwrap();
+}
+
+async fn delete(table: &Table, id: i64) {
+    let mut writer = DataEvolutionDeleteWriter::new(table).unwrap();
+    writer.add_row_ids([id]).unwrap();
+    table
+        .new_write_builder()
+        .new_commit()
+        .commit(writer.prepare_commit().await.unwrap())
+        .await
+        .unwrap();
+}
+
+async fn indexes(table: &Table) -> Vec<IndexManifestEntry> {
+    let manager = table.snapshot_manager();
+    let snapshot = manager.get_latest_snapshot().await.unwrap().unwrap();
+    IndexManifest::read(
+        table.file_io(),
+        &manager.manifest_path(snapshot.index_manifest().unwrap()),
+    )
+    .await
+    .unwrap()
+}
+
+#[tokio::test]
+async fn blob_compaction_rejects_unsupported_tables_and_layouts() {
+    let (_, ordinary) = memory_table(
+        "memory:/ordinary",
+        TableSchema::new(
+            0,
+            &Schema::builder()
+                .column("id", DataType::Int(IntType::new()))
+                .build()
+                .unwrap(),
+        ),
+    );
+    let error = ordinary
+        .new_compact_builder()
+        .with_blob_compaction(true)
+        .new_planner()
+        .err()
+        .unwrap();
+    assert!(error
+        .to_string()
+        .contains("requires a Data Evolution table"));
+    let original = table(&[("compaction.min.file-num", "2")]).await;
+    seed(&original).await;
+    update(&original, 1, Some(b"updated")).await;
+    let plan = compact_plan(&original).await;
+    let results = execute(&original, &plan).await;
+    let before = physical_files(&original).await;
+    for (key, value, expected) in [
+        (
+            "blob.target-file-size",
+            "0 b",
+            "positive blob.target-file-size",
+        ),
+        ("video-frame-field", "payload", "video-file compaction"),
+    ] {
+        let table = original.copy_with_options([(key.into(), 
value.into())].into());
+        let builder = table.new_compact_builder().with_blob_compaction(true);
+        let error = match builder.new_planner() {
+            Ok(planner) => planner.plan().await.unwrap_err(),
+            Err(error) => error,
+        };
+        assert!(error.to_string().contains(expected), "{key}: {error}");
+        let mut task = serde_json::to_value(&plan.tasks()[0]).unwrap();
+        task["context"]["schema"] = 
serde_json::to_value(table.schema()).unwrap();
+        let error = builder
+            .new_executor()
+            .unwrap()
+            .execute(&serde_json::from_value(task.clone()).unwrap())
+            .await
+            .unwrap_err();
+        assert!(error.to_string().contains(expected), "{key}: {error}");
+        let mut forged = serde_json::to_value(&results).unwrap();
+        forged[0]["task"] = task;
+        let error = builder
+            .new_commit()
+            .unwrap()
+            .commit_compact(serde_json::from_value(forged).unwrap())
+            .await
+            .unwrap_err();
+        assert!(error.to_string().contains(expected), "{key}: {error}");
+        assert_eq!(physical_files(&table).await, before);
+        assert_eq!(
+            table
+                .snapshot_manager()
+                .get_latest_snapshot_id()
+                .await
+                .unwrap(),
+            Some(2)
+        );
+    }
+    let inline =
+        original.copy_with_options([("blob-descriptor-field".into(), 
"payload".into())].into());
+    assert!(compact_plan(&inline).await.tasks().is_empty());
+    assert_eq!(physical_files(&inline).await, before);
+
+    let mut schema = serde_json::to_value(original.schema()).unwrap();
+    schema["id"] = (original.schema().id() + 1).into();
+    schema["fields"][1]["type"] = 
serde_json::to_value(DataType::Array(ArrayType::new(
+        DataType::Blob(BlobType::new()),
+    )))
+    .unwrap();
+    let schema: TableSchema = serde_json::from_value(schema).unwrap();
+    persist_table_schema(original.file_io(), original.location(), 
&schema).await;
+    let evolved = original.copy_with_resolved_schema(schema, "main").unwrap();
+    let plan = compact_plan(&evolved).await;
+    assert_eq!(plan.tasks().len(), 1);
+    let error = evolved
+        .new_compact_builder()
+        .new_executor()
+        .unwrap()
+        .execute(&plan.tasks()[0])
+        .await
+        .unwrap_err();
+    assert!(
+        matches!(error, paimon::Error::Unsupported { .. }),
+        "{error}"
+    );
+    assert!(
+        error.to_string().contains("cannot migrate field types"),
+        "{error}"
+    );
+    assert_eq!(physical_files(&evolved).await, before);
+    assert_eq!(
+        evolved
+            .snapshot_manager()
+            .get_latest_snapshot_id()
+            .await
+            .unwrap(),
+        Some(2)
+    );
+    let mut forged = serde_json::to_value(results).unwrap();
+    forged[0]["task"]["context"]["schema"] = 
serde_json::to_value(evolved.schema()).unwrap();
+    forged[0]["files"][0]["_SCHEMA_ID"] = evolved.schema().id().into();
+    let error = evolved
+        .new_compact_builder()
+        .new_commit()
+        .unwrap()
+        .commit_compact(serde_json::from_value(forged).unwrap())
+        .await
+        .unwrap_err();
+    assert!(
+        matches!(error, paimon::Error::Unsupported { .. }),
+        "{error}"
+    );
+    assert!(
+        error.to_string().contains("cannot migrate field types"),
+        "{error}"
+    );
+    assert_eq!(physical_files(&evolved).await, before);
+    assert_eq!(
+        evolved
+            .snapshot_manager()
+            .get_latest_snapshot_id()
+            .await
+            .unwrap(),
+        Some(2)
+    );
+}
+
+#[tokio::test]
+async fn rolled_sparse_updates_compact_without_losing_fallbacks() {
+    let table = table(&[("read.batch-size", "1")]).await;
+    seed(&table).await;
+    let table = table.copy_with_options([("blob.target-file-size".into(), "20 
B".into())].into());
+    let messages = apply(
+        &table,
+        matched(vec![0, 4], vec![Some(b"first"), Some(b"last")]),
+    )
+    .await;
+    let mut ranges = messages
+        .iter()
+        .flat_map(|message| &message.new_files)
+        .map(|file| file.row_id_range().unwrap())
+        .collect::<Vec<_>>();
+    ranges.sort_unstable();
+    assert_eq!(ranges, vec![(0, 0), (1, 4)]);
+    table
+        .new_write_builder()
+        .new_commit()
+        .commit(messages)
+        .await
+        .unwrap();
+    let expected = rows(&table).await;
+    assert_eq!(
+        expected
+            .iter()
+            .map(|row| row.1.as_deref())
+            .collect::<Vec<_>>(),
+        vec![
+            Some(b"first".as_slice()),
+            None,
+            Some(b"".as_slice()),
+            Some(b"old-3".as_slice()),
+            Some(b"last".as_slice()),
+        ]
+    );
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 1);
+    assert_eq!(plan.tasks()[0].files().len(), 3);
+    let results = execute(&table, &plan).await;
+    assert_eq!(results[0].files().len(), 1);
+    assert_eq!(results[0].files()[0].row_id_range(), Some((0, 4)));
+    assert!(results[0].files()[0].file_size > 20);
+    table
+        .new_compact_builder()
+        .new_commit()
+        .unwrap()
+        .commit_compact(results)
+        .await
+        .unwrap();
+    assert_eq!(rows(&table).await, expected);
+    assert!(compact_plan(&table).await.tasks().is_empty());
+}
+
+#[tokio::test]
+async fn blob_compaction_rejects_historical_video_sources() {
+    async fn publish_video(table: &Table) {
+        let mut messages = apply(table, matched(vec![6], 
vec![Some(b"video")])).await;
+        let file = &mut messages[0].new_files[0];
+        let path = format!("{}/bucket-0/{}", table.location(), file.file_name);
+        table.file_io().delete_file(&path).await.unwrap();
+        file.file_name = file.file_name.replace(".blob", ".video");
+        let fixture = include_str!("../../testdata/video/video-v1.hex");
+        let bytes = hex::decode(
+            fixture
+                .lines()
+                .find(|line| !line.is_empty() && !line.starts_with('#'))
+                .unwrap(),
+        )
+        .unwrap();
+        file.file_size = bytes.len() as i64;
+        assert_eq!(file.row_count, 7);
+        table
+            .file_io()
+            .new_output(&format!("{}/bucket-0/{}", table.location(), 
file.file_name))
+            .unwrap()
+            .write(bytes.into())
+            .await
+            .unwrap();
+        table
+            .new_write_builder()
+            .new_commit()
+            .commit(messages)
+            .await
+            .unwrap();
+    }
+
+    for video_before_planning in [true, false] {
+        let table = table(&[]).await;
+        common::incremental_helpers::write_batch(
+            &table,
+            &RecordBatch::try_from_iter([
+                (
+                    "id",
+                    Arc::new(Int32Array::from_iter_values(0..7)) as ArrayRef,
+                ),
+                (
+                    "payload",
+                    
Arc::new(LargeBinaryArray::from(vec![Some(b"base".as_slice()); 7])) as ArrayRef,
+                ),
+                (
+                    "value",
+                    Arc::new(Int32Array::from_iter_values(0..7)) as ArrayRef,
+                ),
+            ])
+            .unwrap(),
+        )
+        .await;
+        if video_before_planning {
+            publish_video(&table).await;
+        }
+        update(&table, 1, Some(b"new-1")).await;
+        update(&table, 6, Some(b"new-6")).await;
+        let builder = table.new_compact_builder().with_blob_compaction(true);
+        let before = physical_files(&table).await;
+        let error = if video_before_planning {
+            builder.new_planner().unwrap().plan().await.unwrap_err()
+        } else {
+            let plan = compact_plan(&table).await;
+            let results = execute(&table, &plan).await;
+            publish_video(&table).await;
+            let expected = rows(&table).await;
+            let error = builder
+                .new_commit()
+                .unwrap()
+                .commit_compact(results)
+                .await
+                .unwrap_err();
+            assert_eq!(rows(&table).await, expected);
+            error
+        };
+        assert!(
+            matches!(error, paimon::Error::Unsupported { .. }),
+            "{error}"
+        );
+        assert!(
+            error.to_string().contains("video-file compaction"),
+            "{error}"
+        );
+        assert!(before.is_subset(&physical_files(&table).await));
+    }
+}
+
+#[tokio::test]
+async fn 
sparse_blob_compaction_preserves_payloads_deletions_versions_and_history() {
+    struct FailAfterPublication;
+
+    #[async_trait::async_trait]
+    impl CommitCallback for FailAfterPublication {
+        async fn call(&self, _: &CommitCallbackContext) -> paimon::Result<()> {
+            Err(paimon::Error::UnexpectedError {
+                message: "injected BLOB compaction callback failure".into(),
+                source: None,
+            })
+        }
+    }
+
+    let table = table(&[("compaction.min.file-num", "2"), ("read.batch-size", 
"2")]).await;
+    seed(&table).await;
+    update(&table, 1, Some(b"new-1")).await;
+    update(&table, 3, None).await;
+    table
+        .new_global_index_build_builder()
+        .with_index_type("bitmap")
+        .with_index_column("id")
+        .execute()
+        .await
+        .unwrap();
+    delete(&table, 4).await;
+    let before = rows(&table).await;
+    let snapshot = table
+        .snapshot_manager()
+        .get_latest_snapshot_id()
+        .await
+        .unwrap()
+        .unwrap();
+    let historical =
+        table.copy_with_options([("scan.snapshot-id".into(), 
snapshot.to_string())].into());
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 1, "the normal anchor needs no rewrite");
+    assert_eq!(plan.tasks()[0].files().len(), 3);
+    let original_files = physical_files(&table).await;
+    let aborted = execute(&table, &plan).await;
+    table
+        .new_compact_builder()
+        .new_commit()
+        .unwrap()
+        .abort_compact(&aborted)
+        .await
+        .unwrap();
+    assert_eq!(physical_files(&table).await, original_files);
+    let results = execute(&table, &plan).await;
+    assert_eq!(results[0].metrics().files_removed, 3);
+    assert_eq!(results[0].metrics().files_added, 1);
+    assert_eq!(results[0].metrics().rows_written, 5);
+    let output = &results[0].files()[0];
+    assert_eq!(output.row_id_range(), Some((0, 4)));
+    assert_eq!(
+        (output.min_sequence_number, output.max_sequence_number),
+        (1, 3)
+    );
+    assert_eq!(output.write_cols, Some(vec!["payload".into()]));
+    delete(&table, 2).await;
+    let expected = rows(&table).await;
+    let expected_indexes = indexes(&table).await;
+    assert!(expected_indexes
+        .iter()
+        .any(|entry| entry.index_file.global_index_meta.is_some()));
+    let mut commit = table
+        .new_compact_builder()
+        .with_commit_user("blob-compact")
+        .unwrap()
+        .new_commit()
+        .unwrap();
+    commit
+        .add_commit_callback(Arc::new(FailAfterPublication))
+        .unwrap();
+    let error = commit.commit_compact(results.clone()).await.unwrap_err();
+    assert!(
+        error
+            .to_string()
+            .contains("injected BLOB compaction callback failure"),
+        "{error}"
+    );
+    assert_eq!(
+        table
+            .snapshot_manager()
+            .get_latest_snapshot_id()
+            .await
+            .unwrap(),
+        Some(snapshot + 2)
+    );
+    let published_files = physical_files(&table).await;
+    assert!(original_files.is_subset(&published_files));
+    assert_eq!(published_files.len(), original_files.len() + 1);
+    assert_eq!(rows(&table).await, expected);
+    assert_eq!(indexes(&table).await, expected_indexes);
+    assert_eq!(rows(&historical).await, before);
+    assert!(compact_plan(&table).await.tasks().is_empty());
+    update(&table, 0, Some(b"after-compaction")).await;
+    assert_eq!(rows(&table).await[0].1, Some(b"after-compaction".to_vec()));
+    let expected = rows(&table).await;
+    let published = table
+        .snapshot_manager()
+        .get_latest_snapshot_id()
+        .await
+        .unwrap();
+    table
+        .new_compact_builder()
+        .with_commit_user("blob-compact")
+        .unwrap()
+        .new_commit()
+        .unwrap()
+        .commit_compact(results)
+        .await
+        .unwrap();
+    assert_eq!(
+        table
+            .snapshot_manager()
+            .get_latest_snapshot_id()
+            .await
+            .unwrap(),
+        published
+    );
+    assert_eq!(rows(&table).await, expected);
+    assert_eq!(rows(&historical).await, before);
+    assert!(published_files.is_subset(&physical_files(&table).await));
+}
+
+#[tokio::test]
+async fn 
cross_range_blob_result_requires_its_normal_merge_and_remaps_latest_deletions() 
{
+    for commit_normal_first in [false, true] {
+        let table = table(&[
+            ("target-file-row-num", "2"),
+            ("compaction.min.file-num", "2"),
+        ])
+        .await;
+        seed_chunks(&table, 1).await;
+        let expected = rows(&table).await;
+        let plan = compact_plan(&table).await;
+        assert_eq!(plan.tasks().len(), 2);
+        let mut results = execute(&table, &plan).await;
+        assert!(results[0].files()[0].file_name.ends_with(".parquet"));
+        assert!(results[1].files()[0].file_name.ends_with(".blob"));
+        let commit = table.new_compact_builder().new_commit().unwrap();
+        let error = commit
+            .commit_compact(vec![results[1].clone()])
+            .await
+            .unwrap_err();
+        assert!(
+            error
+                .to_string()
+                .contains("not covered by one data file range"),
+            "{error}"
+        );
+        assert_eq!(rows(&table).await, expected);
+        delete(&table, 2).await;
+        let expected = rows(&table).await;
+        if commit_normal_first {
+            commit
+                .commit_compact(vec![results.remove(0)])
+                .await
+                .unwrap();
+            assert_eq!(rows(&table).await, expected);
+        }
+        commit.commit_compact(results).await.unwrap();
+        assert_eq!(rows(&table).await, expected);
+        let read = table.new_read_builder();
+        let files = read.new_scan().plan().await.unwrap();
+        assert_eq!(
+            files
+                .splits()
+                .iter()
+                .flat_map(|split| split.data_files())
+                .count(),
+            2
+        );
+        assert!(compact_plan(&table).await.tasks().is_empty());
+    }
+}
+
+#[tokio::test]
+async fn 
blob_tasks_stay_with_unmerged_normal_groups_and_commit_independently() {
+    let table = table(&[
+        ("target-file-row-num", "2"),
+        ("compaction.min.file-num", "100"),
+    ])
+    .await;
+    seed_chunks(&table, 1).await;
+    assert!(compact_plan(&table).await.tasks().is_empty());
+    update(&table, 0, Some(b"first-group")).await;
+    update(&table, 4, Some(b"last-group")).await;
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 2);
+    for task in plan.tasks() {
+        let range = task.files()[0].row_id_range().unwrap();
+        assert!(range == (0, 1) || range == (4, 4), "{range:?}");
+        assert!(task.files().iter().all(|file| {
+            file.file_name.ends_with(".blob")
+                && file
+                    .row_id_range()
+                    .is_some_and(|(first, last)| first >= range.0 && last <= 
range.1)
+        }));
+    }
+    let results = execute(&table, &plan).await;
+    update(&table, 2, Some(b"middle-group")).await;
+    let expected = rows(&table).await;
+    let commit = table.new_compact_builder().new_commit().unwrap();
+    for result in results.into_iter().rev() {
+        commit.commit_compact(vec![result]).await.unwrap();
+        assert_eq!(rows(&table).await, expected);
+    }
+    let remaining = compact_plan(&table).await;
+    assert_eq!(remaining.tasks().len(), 1);
+    assert!(remaining.tasks()[0]
+        .files()
+        .iter()
+        .all(|file| file.first_row_id == Some(2)));
+    let results = execute(&table, &remaining).await;
+    assert_eq!(results[0].files()[0].row_id_range(), Some((2, 3)));
+    commit.commit_compact(results).await.unwrap();
+    assert_eq!(rows(&table).await, expected);
+    assert!(compact_plan(&table).await.tasks().is_empty());
+}
+
+#[tokio::test]
+async fn omitted_versions_and_forged_output_metadata_are_rejected() {
+    let table = table(&[("compaction.min.file-num", "2")]).await;
+    seed(&table).await;
+    update(&table, 1, Some(b"new")).await;
+    update(&table, 3, None).await;
+    let expected = rows(&table).await;
+    let plan = compact_plan(&table).await;
+    let executor = table.new_compact_builder().new_executor().unwrap();
+    let before = physical_files(&table).await;
+    for (key, value, expected) in [
+        (
+            "blob_field_id",
+            serde_json::Value::Null,
+            "missing its field identity",
+        ),
+        (
+            "blob_field_id",
+            serde_json::json!(-1),
+            "not a current dedicated BLOB field",
+        ),
+        (
+            "files",
+            serde_json::json!(&plan.tasks()[0].files()[..1]),
+            "at least two",
+        ),
+    ] {
+        let mut task = serde_json::to_value(&plan.tasks()[0]).unwrap();
+        task[key] = value;
+        let error = executor
+            .execute(&serde_json::from_value(task).unwrap())
+            .await
+            .unwrap_err();
+        assert!(error.to_string().contains(expected), "{key}: {error}");
+        assert_eq!(physical_files(&table).await, before);
+    }
+    for (key, value) in [
+        ("_FIRST_ROW_ID", serde_json::json!(10)),
+        ("_ROW_COUNT", serde_json::json!(0)),
+        ("_MIN_SEQUENCE_NUMBER", serde_json::json!(0)),
+        ("_MAX_SEQUENCE_NUMBER", serde_json::json!(0)),
+    ] {
+        let mut task = serde_json::to_value(&plan.tasks()[0]).unwrap();
+        task["files"][2][key] = value;
+        let error = executor
+            .execute(&serde_json::from_value(task).unwrap())
+            .await
+            .unwrap_err();
+        assert!(
+            matches!(error, paimon::Error::DataInvalid { .. }),
+            "{key}: {error}"
+        );
+        assert_eq!(physical_files(&table).await, before);
+    }
+    let mut task = serde_json::to_value(&plan.tasks()[0]).unwrap();
+    task["files"].as_array_mut().unwrap().remove(1);
+    let task = serde_json::from_value(task).unwrap();
+    let error = executor.execute(&task).await.unwrap_err();
+    assert!(error.to_string().contains("omit overlapping"), "{error}");
+    let results = execute(&table, &plan).await;
+    let commit = table.new_compact_builder().new_commit().unwrap();
+    let mut incomplete = serde_json::to_value(&results).unwrap();
+    incomplete[0]["task"]["files"]
+        .as_array_mut()
+        .unwrap()
+        .remove(1);
+    let error = commit
+        .commit_compact(serde_json::from_value(incomplete).unwrap())
+        .await
+        .unwrap_err();
+    assert!(error.to_string().contains("omit overlapping"), "{error}");
+    for (key, value) in [
+        ("_FIRST_ROW_ID", serde_json::json!(1)),
+        ("_ROW_COUNT", serde_json::json!(4)),
+        ("_MIN_SEQUENCE_NUMBER", serde_json::json!(2)),
+        ("_MAX_SEQUENCE_NUMBER", serde_json::json!(100)),
+        ("_WRITE_COLS_SEQUENCES", serde_json::json!([1])),
+        ("_WRITE_COLS", serde_json::json!(["value"])),
+        ("_FILE_NAME", serde_json::json!("wrong-format.parquet")),
+    ] {
+        let mut broken = serde_json::to_value(&results).unwrap();
+        broken[0]["files"][0][key] = value;
+        let error = commit
+            .commit_compact(serde_json::from_value(broken).unwrap())
+            .await
+            .unwrap_err();
+        assert!(
+            error.to_string().contains("preserve its row-ID range"),
+            "{key}: {error}"
+        );
+    }
+    commit.commit_compact(results).await.unwrap();
+    assert_eq!(rows(&table).await, expected);
+}
+
+#[tokio::test]
+async fn 
blob_compaction_revalidates_concurrent_writes_and_retains_submitted_outputs() {
+    for (concurrent_write, added_files, conflicts) in [
+        ("append", 3, false),
+        ("payload", 2, true),
+        ("value", 2, false),
+    ] {
+        let table = table(&[("compaction.min.file-num", "2")]).await;
+        seed(&table).await;
+        update(&table, 1, Some(b"new")).await;
+        let plan = compact_plan(&table).await;
+        let original = physical_files(&table).await;
+        let results = execute(&table, &plan).await;
+        assert_eq!(physical_files(&table).await.len(), original.len() + 1);
+        match concurrent_write {
+            "payload" => update(&table, 3, Some(b"concurrent")).await,
+            "value" => {
+                let messages = apply(
+                    &table,
+                    RecordBatch::try_from_iter([
+                        ("_ROW_ID", Arc::new(Int64Array::from(vec![3])) as 
ArrayRef),
+                        ("value", Arc::new(Int32Array::from(vec![99])) as 
ArrayRef),
+                    ])
+                    .unwrap(),
+                )
+                .await;
+                table
+                    .new_write_builder()
+                    .new_commit()
+                    .commit(messages)
+                    .await
+                    .unwrap();
+            }
+            "append" => {
+                common::incremental_helpers::write_batch(
+                    &table,
+                    &RecordBatch::try_from_iter([
+                        ("id", Arc::new(Int32Array::from(vec![5])) as 
ArrayRef),
+                        (
+                            "payload",
+                            
Arc::new(LargeBinaryArray::from(vec![Some(b"appended".as_slice())]))
+                                as ArrayRef,
+                        ),
+                        ("value", Arc::new(Int32Array::from(vec![50])) as 
ArrayRef),
+                    ])
+                    .unwrap(),
+                )
+                .await;
+            }
+            _ => unreachable!(),
+        }
+        let expected = rows(&table).await;
+        let commit = table.new_compact_builder().new_commit().unwrap();
+        let outcome = commit.commit_compact(results).await;
+        if conflicts {
+            let error = outcome.unwrap_err();
+            assert!(error.to_string().contains("omit overlapping"), "{error}");
+        } else {
+            outcome.unwrap();
+        }
+        let remaining = physical_files(&table).await;
+        assert!(original.is_subset(&remaining));
+        assert_eq!(remaining.len(), original.len() + added_files);
+        assert_eq!(rows(&table).await, expected);
+    }
+}
+
+#[tokio::test]
+async fn blob_compaction_resolves_field_ids_after_renames_and_name_reuse() {
+    let original = table(&[("compaction.min.file-num", "2")]).await;
+    seed(&original).await;
+    let mut imported_schema = serde_json::to_value(original.schema()).unwrap();
+    imported_schema["fields"][1]["name"] = "renamed".into();
+    let imported_schema: TableSchema = 
serde_json::from_value(imported_schema).unwrap();
+    let schema = imported_schema
+        .apply_changes(vec![SchemaChange::add_column(
+            "payload".into(),
+            DataType::Blob(BlobType::new()),
+        )])
+        .unwrap();
+    persist_table_schema(original.file_io(), original.location(), 
&schema).await;
+    let table = original.copy_with_resolved_schema(schema, "main").unwrap();
+    let batch = RecordBatch::try_from_iter([
+        ("_ROW_ID", Arc::new(Int64Array::from(vec![1])) as ArrayRef),
+        (
+            "renamed",
+            
Arc::new(LargeBinaryArray::from(vec![Some(b"renamed".as_slice())])) as ArrayRef,
+        ),
+        (
+            "payload",
+            Arc::new(LargeBinaryArray::from(vec![Some(b"other".as_slice())])) 
as ArrayRef,
+        ),
+    ])
+    .unwrap();
+    let messages = apply(&table, batch).await;
+    table
+        .new_write_builder()
+        .new_commit()
+        .commit(messages)
+        .await
+        .unwrap();
+    update(&table, 2, Some(b"other-2")).await;
+    let before = read_batch(&table).await;
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 2);
+    let results = execute(&table, &plan).await;
+    assert_eq!(
+        results[0].files()[0].write_cols,
+        Some(vec!["renamed".into()])
+    );
+    assert_eq!(
+        results[1].files()[0].write_cols,
+        Some(vec!["payload".into()])
+    );
+    let mut forged = serde_json::to_value(&results[..1]).unwrap();
+    forged[0]["task"]["blob_field_id"] = table
+        .schema()
+        .fields()
+        .iter()
+        .find(|field| field.name() == "payload")
+        .unwrap()
+        .id()
+        .into();
+    forged[0]["files"][0]["_WRITE_COLS"] = serde_json::json!(["payload"]);
+    let files_before = physical_files(&table).await;
+    let error = table
+        .new_compact_builder()
+        .new_executor()
+        .unwrap()
+        .execute(&serde_json::from_value(forged[0]["task"].clone()).unwrap())
+        .await
+        .unwrap_err();
+    assert!(
+        error.to_string().contains("field ID does not match"),
+        "{error}"
+    );
+    assert_eq!(physical_files(&table).await, files_before);
+    let commit = table.new_compact_builder().new_commit().unwrap();
+    let error = commit
+        .commit_compact(serde_json::from_value(forged).unwrap())
+        .await
+        .unwrap_err();
+    assert!(error.to_string().contains("same field ID"), "{error}");
+    let mut expected = before;
+    for (index, result) in results.into_iter().rev().enumerate() {
+        commit.commit_compact(vec![result]).await.unwrap();
+        assert_eq!(read_batch(&table).await, expected);
+        if index == 0 {
+            update(&table, 0, Some(b"concurrent-other-field")).await;
+            expected = read_batch(&table).await;
+        }
+    }
+    let batch = read_batch(&table).await;
+    let renamed = batch
+        .column_by_name("renamed")
+        .unwrap()
+        .as_any()
+        .downcast_ref::<LargeBinaryArray>()
+        .unwrap();
+    assert_eq!(
+        renamed.iter().collect::<Vec<_>>(),
+        vec![
+            Some(b"old-0".as_slice()),
+            Some(b"renamed".as_slice()),
+            Some(b"".as_slice()),
+            Some(b"old-3".as_slice()),
+            Some(b"old-4".as_slice())
+        ]
+    );
+    let payload = batch
+        .column_by_name("payload")
+        .unwrap()
+        .as_any()
+        .downcast_ref::<LargeBinaryArray>()
+        .unwrap();
+    assert_eq!(
+        payload.iter().collect::<Vec<_>>(),
+        vec![
+            Some(b"concurrent-other-field".as_slice()),
+            Some(b"other".as_slice()),
+            Some(b"other-2".as_slice()),
+            None,
+            None,
+        ]
+    );
+}
+
+#[tokio::test]
+async fn 
collection_updates_and_compaction_preserve_nulls_empty_values_and_fallbacks() {
+    for map in [false, true] {
+        for rolling in [false, true] {
+            let blob = DataType::Blob(BlobType::new());
+            let kind = if map {
+                DataType::Map(MapType::new(
+                    DataType::VarChar(VarCharType::new(100).unwrap()),
+                    blob,
+                ))
+            } else {
+                DataType::Array(ArrayType::new(blob))
+            };
+            let table = typed_table(
+                kind,
+                &[
+                    (
+                        "blob.target-file-size",
+                        if rolling { "20 B" } else { "1 MB" },
+                    ),
+                    ("read.batch-size", "1"),
+                ],
+            )
+            .await;
+            let original = collection_values(
+                map,
+                &[
+                    Some(vec![Some(b"zero"), None, Some(b"")]),
+                    None,
+                    Some(vec![]),
+                    Some(vec![Some(b"three")]),
+                    Some(vec![Some(b"four")]),
+                ],
+            );
+            let builder = table.new_write_builder();
+            let mut writer = builder.new_write().unwrap();
+            writer
+                .write_arrow_batch(
+                    &RecordBatch::try_from_iter([
+                        (
+                            "id",
+                            Arc::new(Int32Array::from(vec![0, 1, 2, 3, 4])) as 
ArrayRef,
+                        ),
+                        ("payload", original.clone()),
+                        (
+                            "value",
+                            Arc::new(Int32Array::from(vec![10, 11, 12, 13, 
14])) as ArrayRef,
+                        ),
+                    ])
+                    .unwrap(),
+                )
+                .await
+                .unwrap();
+            builder
+                .new_commit()
+                .commit(writer.prepare_commit().await.unwrap())
+                .await
+                .unwrap();
+            let values = collection_values(
+                map,
+                &[
+                    Some(vec![Some(b"unused")]),
+                    Some(vec![Some(b"new"), None, Some(b"")]),
+                    None,
+                    Some(vec![Some(b"one")]),
+                ],
+            );
+            let batch = RecordBatch::try_from_iter([
+                (
+                    "_ROW_ID",
+                    Arc::new(Int64Array::from(vec![-1, 4, 3, 1])) as ArrayRef,
+                ),
+                ("payload", values),
+            ])
+            .unwrap()
+            .slice(1, 3);
+            let messages = apply(&table, batch).await;
+            assert!(messages
+                .iter()
+                .flat_map(|message| &message.new_files)
+                .all(|file| file.file_name.ends_with(".blob")));
+            builder.new_commit().commit(messages).await.unwrap();
+            let batch = read_batch(&table).await;
+            let expected = collection_values(
+                map,
+                &[
+                    Some(vec![Some(b"zero"), None, Some(b"")]),
+                    Some(vec![Some(b"one")]),
+                    Some(vec![]),
+                    None,
+                    Some(vec![Some(b"new"), None, Some(b"")]),
+                ],
+            );
+            let expected = arrow_cast::cast(&expected, 
batch.column(1).data_type()).unwrap();
+            assert_eq!(batch.column(1).to_data(), expected.to_data());
+            let descriptors = table.copy_with_options(
+                [("blob-as-descriptor".into(), "true".into())]
+                    .into_iter()
+                    .collect(),
+            );
+            let batch = read_batch(&descriptors).await;
+            let payload = batch.column(1);
+            assert!(payload.is_null(3));
+            let (children, empty) = if map {
+                let map = payload.as_any().downcast_ref::<MapArray>().unwrap();
+                (map.value(4).column(1).clone(), map.value_length(2))
+            } else {
+                let list = 
payload.as_any().downcast_ref::<ListArray>().unwrap();
+                (list.value(4), list.value_length(2))
+            };
+            assert_eq!(empty, 0);
+            let values = children
+                .as_any()
+                .downcast_ref::<LargeBinaryArray>()
+                .unwrap();
+            assert!(values.is_null(1));
+            assert_eq!(
+                BlobDescriptor::deserialize(values.value(0))
+                    .unwrap()
+                    .length(),
+                3
+            );
+            assert_eq!(
+                BlobDescriptor::deserialize(values.value(2))
+                    .unwrap()
+                    .length(),
+                0
+            );
+            let before = read_batch(&table).await;
+            let table =
+                table.copy_with_options([("blob.target-file-size".into(), "1 
MB".into())].into());
+            let plan = compact_plan(&table).await;
+            assert_eq!(plan.tasks().len(), 1);
+            assert!(plan.tasks()[0].files().len() >= 2);
+            let results = execute(&table, &plan).await;
+            assert_eq!(results[0].files().len(), 1);
+            assert_eq!(results[0].files()[0].row_id_range(), Some((0, 4)));
+            assert!(results[0].files()[0].file_name.ends_with(".blob"));
+            table
+                .new_compact_builder()
+                .new_commit()
+                .unwrap()
+                .commit_compact(results)
+                .await
+                .unwrap();
+            assert_eq!(read_batch(&table).await, before);
+            assert!(compact_plan(&table).await.tasks().is_empty());
+        }
+    }
+}
+
+#[tokio::test]
+async fn late_blob_read_failure_cleans_partial_payload_output() {
+    let table = table(&[
+        ("blob.target-file-size", "1 b"),
+        ("compaction.min.file-num", "2"),
+        ("read.batch-size", "1"),
+    ])
+    .await;
+    seed_chunks(&table, 1).await;
+    let table = table.copy_with_options([("blob.target-file-size".into(), "1 
mb".into())].into());
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 1);
+    let last = plan.tasks()[0].files().last().unwrap();
+    let missing = format!("{}/bucket-0/{}", table.location(), last.file_name);
+    table.file_io().delete_file(&missing).await.unwrap();
+    let before = physical_files(&table).await;
+    assert!(table
+        .new_compact_builder()
+        .new_executor()
+        .unwrap()
+        .execute(&plan.tasks()[0])
+        .await
+        .is_err());
+    assert_eq!(physical_files(&table).await, before);
+    assert_eq!(
+        table
+            .snapshot_manager()
+            .get_latest_snapshot_id()
+            .await
+            .unwrap(),
+        Some(1)
+    );
+}
+
+#[tokio::test]
+async fn compact_java_blob_payload_and_placeholder_fixtures() {
+    let table = table(&[("compaction.min.file-num", "2")]).await;
+    let builder = table.new_write_builder();
+    let batch = RecordBatch::try_from_iter([
+        (
+            "id",
+            Arc::new(Int32Array::from(vec![0, 1, 2, 3])) as ArrayRef,
+        ),
+        (
+            "payload",
+            Arc::new(LargeBinaryArray::from(vec![
+                Some(b"hello".as_slice()),
+                None,
+                Some(b"world".as_slice()),
+                Some(b"".as_slice()),
+            ])) as ArrayRef,
+        ),
+        (
+            "value",
+            Arc::new(Int32Array::from(vec![10, 11, 12, 13])) as ArrayRef,
+        ),
+    ])
+    .unwrap();
+    let mut writer = builder.new_write().unwrap();
+    writer.write_arrow_batch(&batch).await.unwrap();
+    let mut messages = writer.prepare_commit().await.unwrap();
+    let file = messages
+        .iter_mut()
+        .flat_map(|message| &mut message.new_files)
+        .find(|file| file.file_name.ends_with(".blob"))
+        .unwrap();
+    let java = include_bytes!("../../testdata/blob/blob-basic.blob");
+    table
+        .file_io()
+        .new_output(&format!("{}/bucket-0/{}", table.location(), 
file.file_name))
+        .unwrap()
+        .write(bytes::Bytes::from_static(java))
+        .await
+        .unwrap();
+    file.file_size = java.len() as i64;
+    builder.new_commit().commit(messages).await.unwrap();
+    let original = rows(&table).await;
+    let mut messages = apply(&table, matched(vec![2], 
vec![Some(b"latest-3")])).await;
+    let file = &mut messages[0].new_files[0];
+    let java = include_bytes!("../../testdata/blob/blob-placeholder.blob");
+    table
+        .file_io()
+        .new_output(&format!("{}/bucket-0/{}", table.location(), 
file.file_name))
+        .unwrap()
+        .write(bytes::Bytes::from_static(java))
+        .await
+        .unwrap();
+    file.file_size = java.len() as i64;
+    file.row_count = 4;
+    file.min_sequence_number = 1;
+    file.max_sequence_number = 2;
+    file.column_max_sequence_numbers = Some(vec![1]);
+    builder.new_commit().commit(messages).await.unwrap();
+    let before = rows(&table).await;
+    assert_eq!(
+        before
+            .iter()
+            .map(|row| row.1.as_deref())
+            .collect::<Vec<_>>(),
+        vec![
+            Some(b"hello".as_slice()),
+            None,
+            Some(b"latest-3".as_slice()),
+            Some(b"".as_slice())
+        ]
+    );
+    let plan = compact_plan(&table).await;
+    let results = execute(&table, &plan).await;
+    assert_eq!(
+        results[0].files()[0].column_max_sequence_numbers,
+        Some(vec![1])
+    );
+    builder.new_commit().commit_compact(results).await.unwrap();
+    assert_eq!(rows(&table).await, before);
+    let history = table.copy_with_options([("scan.snapshot-id".into(), 
"1".into())].into());
+    assert_eq!(rows(&history).await, original);
+    update(&table, 0, Some(b"after-java-compaction")).await;
+    let mut expected = before;
+    expected[0].1 = Some(b"after-java-compaction".to_vec());
+    assert_eq!(rows(&table).await, expected);
+    assert_eq!(rows(&history).await, original);
+}
+
+#[tokio::test]
+async fn dropped_blob_field_is_not_compacted_into_reused_name() {
+    let original = table(&[("compaction.min.file-num", "2")]).await;
+    seed(&original).await;
+    update(&original, 1, Some(b"old-field")).await;
+    let historical = original.copy_with_options([("scan.snapshot-id".into(), 
"2".into())].into());
+    let historical_rows = rows(&historical).await;
+    let schema = original
+        .schema()
+        .apply_changes(vec![
+            SchemaChange::drop_column("payload".into()),
+            SchemaChange::add_column("payload".into(), 
DataType::Blob(BlobType::new())),
+        ])
+        .unwrap();
+    persist_table_schema(original.file_io(), original.location(), 
&schema).await;
+    let table = original.copy_with_resolved_schema(schema, "main").unwrap();
+    update(&table, 1, Some(b"new-field")).await;
+    update(&table, 2, Some(b"new-field-2")).await;
+    let expected = vec![
+        (0, None, 10),
+        (1, Some(b"new-field".to_vec()), 11),
+        (2, Some(b"new-field-2".to_vec()), 12),
+        (3, None, 13),
+        (4, None, 14),
+    ];
+    assert_eq!(rows(&table).await, expected);
+    let plan = compact_plan(&table).await;
+    assert_eq!(plan.tasks().len(), 1);
+    assert!(plan.tasks()[0]
+        .files()
+        .iter()
+        .all(|file| file.schema_id == table.schema().id()));
+    let results = execute(&table, &plan).await;
+    table
+        .new_compact_builder()
+        .new_commit()
+        .unwrap()
+        .commit_compact(results)
+        .await
+        .unwrap();
+    assert_eq!(rows(&table).await, expected);
+    assert_eq!(rows(&historical).await, historical_rows);
+}
diff --git a/crates/paimon/tests/blob_update_test.rs 
b/crates/paimon/tests/blob_update_test.rs
index c5a651bc..9413f3d8 100644
--- a/crates/paimon/tests/blob_update_test.rs
+++ b/crates/paimon/tests/blob_update_test.rs
@@ -16,6 +16,8 @@
 // under the License.
 
 mod common;
+#[path = "blob_update/compaction.rs"]
+mod compaction;
 
 use arrow_array::builder::{LargeBinaryBuilder, ListBuilder, MapBuilder, 
StringBuilder};
 use arrow_array::{
@@ -145,44 +147,6 @@ async fn 
short_deltas_keep_prefix_placeholders_and_stop_before_unchanged_tail()
     );
 }
 
-#[tokio::test]
-async fn sparse_positions_continue_across_rolled_delta_files() {
-    let table = table(&[("blob.target-file-size", "20 B")]).await;
-    seed(&table).await;
-    let messages = apply(
-        &table,
-        matched(vec![0, 4], vec![Some(b"first"), Some(b"last")]),
-    )
-    .await;
-    let mut ranges = messages
-        .iter()
-        .flat_map(|message| &message.new_files)
-        .map(|file| file.row_id_range().unwrap())
-        .collect::<Vec<_>>();
-    ranges.sort_unstable();
-    assert_eq!(ranges, vec![(0, 0), (1, 4)]);
-    table
-        .new_write_builder()
-        .new_commit()
-        .commit(messages)
-        .await
-        .unwrap();
-    assert_eq!(
-        rows(&table)
-            .await
-            .iter()
-            .map(|row| row.1.clone())
-            .collect::<Vec<_>>(),
-        vec![
-            Some(b"first".to_vec()),
-            None,
-            Some(vec![]),
-            Some(b"old-3".to_vec()),
-            Some(b"last".to_vec()),
-        ]
-    );
-}
-
 #[tokio::test]
 async fn absent_blob_baseline_writes_real_nulls_for_the_entire_normal_range() {
     let table = table(&[]).await;
@@ -325,136 +289,6 @@ fn collection_values(map: bool, values: 
&[Option<Vec<Option<&[u8]>>>]) -> ArrayR
     }
 }
 
-#[tokio::test]
-async fn collection_updates_preserve_parent_null_empty_and_child_null_values() 
{
-    for map in [false, true] {
-        for rolling in [false, true] {
-            let blob = DataType::Blob(BlobType::new());
-            let kind = if map {
-                DataType::Map(MapType::new(
-                    DataType::VarChar(VarCharType::new(100).unwrap()),
-                    blob,
-                ))
-            } else {
-                DataType::Array(ArrayType::new(blob))
-            };
-            let table = typed_table(
-                kind,
-                &[(
-                    "blob.target-file-size",
-                    if rolling { "20 B" } else { "1 MB" },
-                )],
-            )
-            .await;
-            let original = collection_values(
-                map,
-                &[
-                    Some(vec![Some(b"zero"), None, Some(b"")]),
-                    None,
-                    Some(vec![]),
-                    Some(vec![Some(b"three")]),
-                    Some(vec![Some(b"four")]),
-                ],
-            );
-            let builder = table.new_write_builder();
-            let mut writer = builder.new_write().unwrap();
-            writer
-                .write_arrow_batch(
-                    &RecordBatch::try_from_iter([
-                        (
-                            "id",
-                            Arc::new(Int32Array::from(vec![0, 1, 2, 3, 4])) as 
ArrayRef,
-                        ),
-                        ("payload", original.clone()),
-                        (
-                            "value",
-                            Arc::new(Int32Array::from(vec![10, 11, 12, 13, 
14])) as ArrayRef,
-                        ),
-                    ])
-                    .unwrap(),
-                )
-                .await
-                .unwrap();
-            builder
-                .new_commit()
-                .commit(writer.prepare_commit().await.unwrap())
-                .await
-                .unwrap();
-            // Sliced input exercises non-zero list/map offsets as well as
-            // unordered row IDs spanning separate input batches.
-            let values = collection_values(
-                map,
-                &[
-                    Some(vec![Some(b"unused")]),
-                    Some(vec![Some(b"new"), None, Some(b"")]),
-                    None,
-                ],
-            );
-            let batch = RecordBatch::try_from_iter([
-                (
-                    "_ROW_ID",
-                    Arc::new(Int64Array::from(vec![-1, 4, 1])) as ArrayRef,
-                ),
-                ("payload", values),
-            ])
-            .unwrap()
-            .slice(1, 2);
-            let messages = apply(&table, batch).await;
-            assert!(messages
-                .iter()
-                .flat_map(|message| &message.new_files)
-                .all(|file| file.file_name.ends_with(".blob")));
-            builder.new_commit().commit(messages).await.unwrap();
-            let batch = read_batch(&table).await;
-            let expected = collection_values(
-                map,
-                &[
-                    Some(vec![Some(b"zero"), None, Some(b"")]),
-                    None,
-                    Some(vec![]),
-                    Some(vec![Some(b"three")]),
-                    Some(vec![Some(b"new"), None, Some(b"")]),
-                ],
-            );
-            let expected = arrow_cast::cast(&expected, 
batch.column(1).data_type()).unwrap();
-            assert_eq!(batch.column(1).to_data(), expected.to_data());
-            let descriptors = table.copy_with_options(
-                [("blob-as-descriptor".into(), "true".into())]
-                    .into_iter()
-                    .collect(),
-            );
-            let batch = read_batch(&descriptors).await;
-            let payload = batch.column(1);
-            assert!(payload.is_null(1));
-            let (children, empty) = if map {
-                let map = payload.as_any().downcast_ref::<MapArray>().unwrap();
-                (map.value(4).column(1).clone(), map.value_length(2))
-            } else {
-                let list = 
payload.as_any().downcast_ref::<ListArray>().unwrap();
-                (list.value(4), list.value_length(2))
-            };
-            assert_eq!(empty, 0);
-            let values = children
-                .as_any()
-                .downcast_ref::<LargeBinaryArray>()
-                .unwrap();
-            assert!(values.is_null(1));
-            assert_eq!(
-                BlobDescriptor::deserialize(values.value(0))
-                    .unwrap()
-                    .length(),
-                3
-            );
-            assert_eq!(
-                BlobDescriptor::deserialize(values.value(2))
-                    .unwrap()
-                    .length(),
-                0
-            );
-        }
-    }
-}
-
 async fn seed(table: &Table) {
     seed_chunks(table, 5).await;
 }
@@ -575,17 +409,20 @@ async fn rows(table: &Table) -> Vec<(i32, 
Option<Vec<u8>>, i32)> {
     let mut rows = Vec::new();
     for batch in batches {
         let ids = batch
-            .column(0)
+            .column_by_name("id")
+            .unwrap()
             .as_any()
             .downcast_ref::<Int32Array>()
             .unwrap();
         let blobs = batch
-            .column(1)
+            .column_by_name("payload")
+            .unwrap()
             .as_any()
             .downcast_ref::<LargeBinaryArray>()
             .unwrap();
         let values = batch
-            .column(2)
+            .column_by_name("value")
+            .unwrap()
             .as_any()
             .downcast_ref::<Int32Array>()
             .unwrap();
diff --git a/crates/paimon/tests/data_evolution_compact_layout_test.rs 
b/crates/paimon/tests/data_evolution_compact_layout_test.rs
index 5158025d..37aec581 100644
--- a/crates/paimon/tests/data_evolution_compact_layout_test.rs
+++ b/crates/paimon/tests/data_evolution_compact_layout_test.rs
@@ -17,17 +17,32 @@
 
 mod common;
 
+use std::collections::BTreeMap;
 use std::sync::Arc;
 
 use arrow_array::{
-    types::Float32Type, Array, ArrayRef, FixedSizeListArray, Float32Array, 
Int32Array, RecordBatch,
+    types::Float32Type, ArrayRef, FixedSizeListArray, Int32Array, Int64Array, 
LargeBinaryArray,
+    RecordBatch,
 };
 use common::incremental_helpers::{memory_table, persist_table_schema, 
setup_dirs, write_batch};
 use futures::TryStreamExt;
-use paimon::spec::{DataType, FloatType, IntType, Schema, SchemaChange, 
TableSchema, VectorType};
+use paimon::spec::{
+    BlobDescriptor, BlobType, DataType, FloatType, IntType, Schema, 
SchemaChange, TableSchema,
+    VectorType,
+};
 use paimon::table::Table;
 
-async fn vector_rows(table: &Table) -> Vec<(i32, Option<Vec<f32>>)> {
+fn payload_value(payload: &ArrayRef, row: usize) -> ArrayRef {
+    assert!(!payload.is_null(row));
+    if let Some(vector) = 
payload.as_any().downcast_ref::<FixedSizeListArray>() {
+        vector.value(row)
+    } else {
+        payload.slice(row, 1)
+    }
+}
+
+async fn rows(table: &Table) -> BTreeMap<i32, ArrayRef> {
+    let table = table.copy_with_options([("blob-as-descriptor".into(), 
"true".into())].into());
     let read = table.new_read_builder();
     let plan = read.new_scan().plan().await.unwrap();
     let batches: Vec<RecordBatch> = read
@@ -38,7 +53,7 @@ async fn vector_rows(table: &Table) -> Vec<(i32, 
Option<Vec<f32>>)> {
         .try_collect()
         .await
         .unwrap();
-    let mut rows = Vec::new();
+    let mut rows = BTreeMap::new();
     for batch in batches {
         let ids = batch
             .column_by_name("id")
@@ -46,119 +61,178 @@ async fn vector_rows(table: &Table) -> Vec<(i32, 
Option<Vec<f32>>)> {
             .as_any()
             .downcast_ref::<Int32Array>()
             .unwrap();
-        let vectors = batch
-            .column_by_name("embedding")
-            .unwrap()
-            .as_any()
-            .downcast_ref::<FixedSizeListArray>()
-            .unwrap();
         for row in 0..batch.num_rows() {
-            let value = (!vectors.is_null(row)).then(|| {
-                let vector = vectors.value(row);
-                vector
-                    .as_any()
-                    .downcast_ref::<Float32Array>()
-                    .unwrap()
-                    .values()
-                    .to_vec()
-            });
-            rows.push((ids.value(row), value));
+            assert!(rows
+                .insert(
+                    ids.value(row),
+                    payload_value(batch.column_by_name("payload").unwrap(), 
row)
+                )
+                .is_none());
         }
     }
-    rows.sort_by_key(|row| row.0);
     rows
 }
 
 #[tokio::test]
-async fn 
compact_rejects_historical_inline_vectors_after_enabling_dedicated_format() {
-    let schema = Schema::builder()
-        .column("id", DataType::Int(IntType::new()))
-        .column(
-            "embedding",
+async fn 
compact_rejects_historical_inline_fields_after_enabling_dedicated_format() {
+    for blob in [false, true] {
+        let data_type = if blob {
+            DataType::Blob(BlobType::new())
+        } else {
             DataType::Vector(
                 VectorType::try_new(true, 2, 
DataType::Float(FloatType::new())).unwrap(),
-            ),
-        )
-        .option("row-tracking.enabled", "true")
-        .option("data-evolution.enabled", "true")
-        .option("compaction.min.file-num", "2")
-        .build()
-        .unwrap();
-    let location = format!("memory:/de_compact_vector_layout/{}", 
uuid::Uuid::new_v4());
-    let (io, original) = memory_table(&location, TableSchema::new(0, &schema));
-    setup_dirs(&io, &location).await;
-    persist_table_schema(&io, &location, original.schema()).await;
-    for id in [1, 2] {
-        write_batch(
-            &original,
-            &RecordBatch::try_from_iter([
-                ("id", Arc::new(Int32Array::from(vec![id])) as ArrayRef),
-                (
-                    "embedding",
-                    Arc::new(
-                        FixedSizeListArray::from_iter_primitive::<Float32Type, 
_, _>(
-                            vec![Some(vec![Some(id as f32), Some(10.0)])],
-                            2,
+            )
+        };
+        let mut schema = Schema::builder()
+            .column("id", DataType::Int(IntType::new()))
+            .column("payload", data_type)
+            .option("row-tracking.enabled", "true")
+            .option("data-evolution.enabled", "true")
+            .option("compaction.min.file-num", "2");
+        if blob {
+            schema = schema.option("blob-descriptor-field", "payload");
+        }
+        let schema = schema.build().unwrap();
+        let location = format!("memory:/de_compact_layout/{}", 
uuid::Uuid::new_v4());
+        let (io, original) = memory_table(&location, TableSchema::new(0, 
&schema));
+        setup_dirs(&io, &location).await;
+        persist_table_schema(&io, &location, original.schema()).await;
+        let mut expected = BTreeMap::new();
+        for id in [1, 2] {
+            let payload: ArrayRef = if blob {
+                let descriptor =
+                    BlobDescriptor::new(format!("memory:/payload/{id}"), 0, 
10).serialize();
+                
Arc::new(LargeBinaryArray::from(vec![Some(descriptor.as_slice())]))
+            } else {
+                Arc::new(
+                    FixedSizeListArray::from_iter_primitive::<Float32Type, _, 
_>(
+                        vec![Some(vec![Some(id as f32), Some(10.0)])],
+                        2,
+                    ),
+                )
+            };
+            expected.insert(id, payload_value(&payload, 0));
+            write_batch(
+                &original,
+                &RecordBatch::try_from_iter([
+                    ("id", Arc::new(Int32Array::from(vec![id])) as ArrayRef),
+                    ("payload", payload),
+                ])
+                .unwrap(),
+            )
+            .await;
+        }
+        assert_eq!(rows(&original).await, expected);
+        let original_plan = original
+            .new_compact_builder()
+            .new_planner()
+            .unwrap()
+            .plan()
+            .await
+            .unwrap();
+        let schema = original
+            .schema()
+            .apply_changes(vec![if blob {
+                SchemaChange::RemoveOption {
+                    key: "blob-descriptor-field".into(),
+                }
+            } else {
+                SchemaChange::SetOption {
+                    key: "vector.file.format".into(),
+                    value: "parquet".into(),
+                }
+            }])
+            .unwrap();
+        persist_table_schema(&io, &location, &schema).await;
+        let evolved = Table::new(io, original.identifier().clone(), location, 
schema, None);
+        assert_eq!(
+            rows(&evolved).await,
+            expected,
+            "the reader must still see inline values before compaction"
+        );
+        let builder = evolved.new_compact_builder().with_blob_compaction(blob);
+        let error = builder.new_planner().unwrap().plan().await.unwrap_err();
+        assert!(matches!(error, paimon::Error::Unsupported { .. }));
+        assert!(error
+            .to_string()
+            .contains("historical inline field 'payload'"));
+        let mut task = 
serde_json::to_value(&original_plan.tasks()[0]).unwrap();
+        task["context"]["schema"] = 
serde_json::to_value(evolved.schema()).unwrap();
+        let task: paimon::table::CompactTask = 
serde_json::from_value(task).unwrap();
+        let error = builder
+            .new_executor()
+            .unwrap()
+            .execute(&task)
+            .await
+            .unwrap_err();
+        assert!(matches!(error, paimon::Error::Unsupported { .. }));
+        assert_eq!(
+            evolved
+                .snapshot_manager()
+                .get_latest_snapshot_id()
+                .await
+                .unwrap(),
+            Some(2)
+        );
+        assert_eq!(
+            rows(&evolved).await,
+            expected,
+            "rejected compaction must preserve every historical inline value"
+        );
+        if blob {
+            let evolved = evolved
+                .copy_with_options([("compaction.min.file-num".into(), 
"100".into())].into());
+            for value in [b"new".as_slice(), b"latest".as_slice()] {
+                let builder = evolved.new_write_builder();
+                let messages = builder
+                    .new_update()
+                    .unwrap()
+                    
.update_by_arrow_with_row_id(vec![RecordBatch::try_from_iter([
+                        ("_ROW_ID", Arc::new(Int64Array::from(vec![0])) as 
ArrayRef),
+                        (
+                            "payload",
+                            
Arc::new(LargeBinaryArray::from(vec![Some(value)])) as ArrayRef,
                         ),
-                    ) as ArrayRef,
-                ),
-            ])
-            .unwrap(),
-        )
-        .await;
+                    ])
+                    .unwrap()])
+                    .await
+                    .unwrap();
+                builder.new_commit().commit(messages).await.unwrap();
+            }
+            let expected = rows(&evolved).await;
+            let builder = 
evolved.new_compact_builder().with_blob_compaction(true);
+            let plan = builder.new_planner().unwrap().plan().await.unwrap();
+            assert_eq!(plan.tasks().len(), 1);
+            assert_eq!(plan.tasks()[0].files().len(), 2);
+            assert!(plan.tasks()[0]
+                .files()
+                .iter()
+                .all(|file| file.file_name.ends_with(".blob")));
+            let error = builder
+                .new_executor()
+                .unwrap()
+                .execute(&plan.tasks()[0])
+                .await
+                .unwrap_err();
+            assert!(
+                matches!(error, paimon::Error::Unsupported { .. }),
+                "{error}"
+            );
+            assert!(
+                error
+                    .to_string()
+                    .contains("historical inline field 'payload'"),
+                "{error}"
+            );
+            assert_eq!(rows(&evolved).await, expected);
+            assert_eq!(
+                evolved
+                    .snapshot_manager()
+                    .get_latest_snapshot_id()
+                    .await
+                    .unwrap(),
+                Some(4)
+            );
+        }
     }
-    let expected = vec![(1, Some(vec![1.0, 10.0])), (2, Some(vec![2.0, 
10.0]))];
-    assert_eq!(vector_rows(&original).await, expected);
-    let original_plan = original
-        .new_compact_builder()
-        .new_planner()
-        .unwrap()
-        .plan()
-        .await
-        .unwrap();
-    let schema = original
-        .schema()
-        .apply_changes(vec![SchemaChange::SetOption {
-            key: "vector.file.format".into(),
-            value: "parquet".into(),
-        }])
-        .unwrap();
-    persist_table_schema(&io, &location, &schema).await;
-    let evolved = Table::new(io, original.identifier().clone(), location, 
schema, None);
-    assert_eq!(
-        vector_rows(&evolved).await,
-        expected,
-        "the supported reader must still see inline vectors before compaction"
-    );
-    let builder = evolved.new_compact_builder();
-    let error = builder.new_planner().unwrap().plan().await.unwrap_err();
-    assert!(matches!(error, paimon::Error::Unsupported { .. }));
-    assert!(error
-        .to_string()
-        .contains("historical inline field 'embedding'"));
-    // Workers independently enforce the layout guard when handed a serialized
-    // task, even if its captured table schema matches the current options.
-    let mut task = serde_json::to_value(&original_plan.tasks()[0]).unwrap();
-    task["context"]["schema"] = 
serde_json::to_value(evolved.schema()).unwrap();
-    let task: paimon::table::CompactTask = 
serde_json::from_value(task).unwrap();
-    let error = builder
-        .new_executor()
-        .unwrap()
-        .execute(&task)
-        .await
-        .unwrap_err();
-    assert!(matches!(error, paimon::Error::Unsupported { .. }));
-    assert_eq!(
-        evolved
-            .snapshot_manager()
-            .get_latest_snapshot_id()
-            .await
-            .unwrap(),
-        Some(2)
-    );
-    assert_eq!(
-        vector_rows(&evolved).await,
-        expected,
-        "rejected compaction must preserve every historical inline vector"
-    );
 }
diff --git a/crates/paimon/tests/data_evolution_compact_test.rs 
b/crates/paimon/tests/data_evolution_compact_test.rs
index f8369cca..0954cbf8 100644
--- a/crates/paimon/tests/data_evolution_compact_test.rs
+++ b/crates/paimon/tests/data_evolution_compact_test.rs
@@ -320,7 +320,7 @@ async fn 
compact_moves_latest_deletion_vectors_and_keeps_physical_slots() {
 }
 
 #[tokio::test]
-async fn compact_retains_dedicated_blob_and_vector_files() {
+async fn compact_keeps_vector_files_and_only_rewrites_blobs_when_enabled() {
     use arrow_array::{types::Float32Type, FixedSizeListArray, 
LargeBinaryArray};
     use paimon::spec::{BlobType, FloatType, VectorType};
 
@@ -375,14 +375,14 @@ async fn 
compact_retains_dedicated_blob_and_vector_files() {
     read.with_projection(&["id", "payload", "embedding"])
         .unwrap();
     let original = read.new_scan().plan().await.unwrap();
-    let blobs = original
+    let dedicated_files = original
         .splits()
         .iter()
         .flat_map(|split| split.data_files())
         .filter(|file| file.file_name.ends_with(".blob") || 
file.file_name.contains(".vector."))
         .cloned()
         .collect::<Vec<_>>();
-    assert_eq!(blobs.len(), 4);
+    assert_eq!(dedicated_files.len(), 4);
     let (_, results) = execute(&table).await;
     assert_eq!(
         results[0].files()[0].write_cols,
@@ -396,12 +396,40 @@ async fn 
compact_retains_dedicated_blob_and_vector_files() {
         .await
         .unwrap();
     let latest = read.new_scan().plan().await.unwrap();
-    for blob in blobs {
+    for file in &dedicated_files {
         assert!(latest
             .splits()
             .iter()
             .flat_map(|split| split.data_files())
-            .any(|file| file == &blob));
+            .any(|active| active == file));
+    }
+    let builder = table.new_compact_builder().with_blob_compaction(true);
+    let plan = builder.new_planner().unwrap().plan().await.unwrap();
+    assert_eq!(plan.tasks().len(), 1);
+    let result = builder
+        .new_executor()
+        .unwrap()
+        .execute(&plan.tasks()[0])
+        .await
+        .unwrap();
+    assert_eq!(result.files().len(), 1);
+    assert!(result.files()[0].file_name.ends_with(".blob"));
+    builder
+        .new_commit()
+        .unwrap()
+        .commit_compact(vec![result])
+        .await
+        .unwrap();
+    let latest = read.new_scan().plan().await.unwrap();
+    for vector in dedicated_files
+        .iter()
+        .filter(|file| file.file_name.contains(".vector."))
+    {
+        assert!(latest
+            .splits()
+            .iter()
+            .flat_map(|split| split.data_files())
+            .any(|file| file == vector));
     }
     let batches: Vec<RecordBatch> = read
         .new_read()
diff --git a/docs/src/compaction.md b/docs/src/compaction.md
index 15c375d3..5cfcf8c7 100644
--- a/docs/src/compaction.md
+++ b/docs/src/compaction.md
@@ -19,10 +19,10 @@ under the License.
 
 # Table Compaction
 
-Rust supports small-file compaction for ordinary append tables, normal-file
-compaction for Data Evolution tables, and sorted-run compaction for primary-key
-tables with fixed or dynamic buckets. `CompactBuilder` creates
-a `CompactPlanner`, a `CompactExecutor`, and a `TableCommit`. Planning and
+Rust supports small-file compaction for ordinary append tables, normal-file and
+opt-in dedicated BLOB compaction for Data Evolution tables, and sorted-run
+compaction for primary-key tables with fixed or dynamic buckets. 
`CompactBuilder`
+creates a `CompactPlanner`, a `CompactExecutor`, and a `TableCommit`. Planning 
and
 execution do not publish snapshots; `commit_compact` atomically publishes the
 selected results in a `COMPACT` snapshot. DataFusion SQL runs this flow through
 [`CALL sys.compact`](sql.md#compact), and Python through
@@ -688,16 +688,72 @@ Changing storage options does not migrate values in 
existing files. If selected
 normal files still provide a field that the current schema stores in dedicated
 files, compaction is rejected before writing or publishing output. Migrate 
those
 historical inline values first; otherwise omitting the field would lose data.
-With deletion vectors enabled, one output file is limited to 4,294,967,296
+With deletion vectors enabled, one normal output file is limited to 
4,294,967,296
 physical row slots so every local position remains deletable by the current
 Rust writer. Wider rewrites are rejected before execution; 64-bit 
deletion-vector
 writing is not yet supported.
 
-Dedicated Blob/Vector compaction, splitting large normal files, and 
materializing
+Dedicated Vector compaction, splitting large normal files, and materializing
 deletions into reassigned row IDs are not provided. Setting
 `data-evolution.compaction.split-large-files=true` or
 `data-evolution.compaction.rewrite-row-ids=true` is rejected.
 
+### Dedicated BLOB files
+
+Enable payload compaction explicitly on the Rust builder:
+
+```rust
+let builder = table.new_compact_builder().with_blob_compaction(true);
+let plan = builder.new_planner()?.plan().await?;
+let executor = builder.new_executor()?;
+let mut results = Vec::new();
+for task in plan.tasks() {
+    results.push(executor.execute(task).await?);
+}
+builder.new_commit()?.commit_compact(results).await?;
+```
+
+The default planner and automatic compaction continue to select normal files.
+The BLOB option applies to Data Evolution append tables with row tracking,
+`bucket=-1`, and no primary key. It supports dedicated `BLOB`, `ARRAY<BLOB>`,
+and `MAP<K, BLOB>` files, following Java's `DataEvolutionBlobCompactTask`.
+Video-frame fields and historical `.video` sources are rejected even if the
+current schema no longer configures video storage. BLOB field-type conversion
+and migration from inline storage are unsupported.
+The BLOB switch is currently exposed through the Rust builder; SQL and language
+bindings continue to use normal-file compaction.
+
+Planning resolves historical schemas by field ID, preserving renamed field
+identity and separating dropped/recreated fields with reused names. Each task
+contains at least two files of one field. Overlapping versions stay together;
+adjacent groups are packed by `blob.target-file-size`, while gaps and 
standalone
+files at or above that size end a bin. A task streams effective values, 
resolving
+sparse-update placeholders through older versions, into one new `.blob` file.
+The target guides input selection; write-time size and row limits do not roll
+the output. NULL, empty payloads, collection nulls, row IDs, sequence bounds,
+and column sequence metadata are preserved. Deleted physical slots remain;
+BLOB-only tasks retain the existing normal anchors and deletion vectors.
+For example, a five-row baseline with two sparse updates goes from three BLOB
+files to one while keeping the normal anchor and all five physical row slots.
+
+When a BLOB output spans several normal groups, commit it with its planned
+normal merge, or commit that normal merge first. Other task subsets can be
+committed independently. The committer checks the final row-range layout on
+each attempt and rejects omitted or concurrently added overlapping versions
+of the same BLOB field. Historical field IDs, types and supported task options
+are checked again at publication, including for serialized worker results.
+BLOB-only tasks can coexist with updates to other fields or disjoint row-ID
+ranges, disjoint appends and logical deletions. Retained snapshots keep their
+original files.
+Failed execution cleans its partial outputs; use `abort_compact`
+for earlier results that were never submitted. After a failed or uncertain 
commit,
+retain the submitted outputs and retry with the same `commit_user` and results.
+In a mixed plan, `rows_written` sums the physical slots of normal and BLOB
+outputs, so it can count the same logical row in more than one task.
+
+This operation copies dedicated BLOB payloads. Primary-key managed BLOB
+compaction below merges descriptors and rebuilds reference sidecars instead.
+
 ## Primary-key managed BLOB compaction
 
 Primary-key tables with managed `BLOB`, `ARRAY<BLOB>`, or `MAP<K, BLOB>` fields

Reply via email to