From b84422a4a1bba8b66899a26bc1446d571005c773 Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Fri, 31 May 2024 15:30:04 -0700 Subject: [PATCH] Shouldn't stop just because a step returned no files --- src/functions/delta_scan.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/functions/delta_scan.cpp b/src/functions/delta_scan.cpp index df5ad92..36bece6 100644 --- a/src/functions/delta_scan.cpp +++ b/src/functions/delta_scan.cpp @@ -180,14 +180,12 @@ string DeltaSnapshot::GetFile(idx_t i) { } while(i >= resolved_files.size()) { - auto size_before = resolved_files.size(); - auto have_scan_data_res = ffi::kernel_scan_data_next(scan_data_iterator.get(), this, visit_data); auto have_scan_data = TryUnpackKernelResult(have_scan_data_res); - // TODO: shouldn't the kernel always return false here? - if (!have_scan_data || resolved_files.size() == size_before) { + // kernel has indicated that we have no more data to scan + if (!have_scan_data) { files_exhausted = true; return ""; }