From e688ad472355e40bb8cc232d6da7ca0b64d3dde9 Mon Sep 17 00:00:00 2001 From: Robert Pack Date: Wed, 14 Aug 2024 22:00:49 +0200 Subject: [PATCH] fix: allow missing file stats in log replay --- crates/core/src/kernel/snapshot/replay.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/core/src/kernel/snapshot/replay.rs b/crates/core/src/kernel/snapshot/replay.rs index 78667013f9..e83dbb55f6 100644 --- a/crates/core/src/kernel/snapshot/replay.rs +++ b/crates/core/src/kernel/snapshot/replay.rs @@ -108,8 +108,9 @@ fn map_batch( ) -> DeltaResult { let mut new_batch = batch.clone(); + let stats = ex::extract_and_cast_opt::(&batch, "add.stats"); let stats_parsed_col = ex::extract_and_cast_opt::(&batch, "add.stats_parsed"); - if stats_parsed_col.is_none() { + if stats_parsed_col.is_none() && stats.is_some() { new_batch = parse_stats(new_batch, stats_schema, config)?; }