From 737946effb1d2bac6bfe874a2586da7c0e098523 Mon Sep 17 00:00:00 2001 From: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com> Date: Wed, 21 Aug 2024 21:22:24 +0200 Subject: [PATCH] fix: skip collecting files when set --- crates/core/src/kernel/snapshot/mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/core/src/kernel/snapshot/mod.rs b/crates/core/src/kernel/snapshot/mod.rs index 8d5101f2df..44671de6d3 100644 --- a/crates/core/src/kernel/snapshot/mod.rs +++ b/crates/core/src/kernel/snapshot/mod.rs @@ -364,8 +364,13 @@ impl EagerSnapshot { .iter() .flat_map(get_visitor) .collect::>(); - let snapshot = Snapshot::try_new(table_root, store.clone(), config, version).await?; - let files = snapshot.files(store, &mut visitors)?.try_collect().await?; + let snapshot = + Snapshot::try_new(table_root, store.clone(), config.clone(), version).await?; + + let files = match config.require_files { + true => snapshot.files(store, &mut visitors)?.try_collect().await?, + false => vec![], + }; let mut sn = Self { snapshot,