@@ -129,7 +129,7 @@ Result<std::shared_ptr<FileStoreScan::RawPlan>> FileStoreScan::CreatePlan() cons
129129 }
130130 }
131131 const int64_t all_data_files = std::accumulate (
132- all_manifest_file_metas.begin (), all_manifest_file_metas.end (), 0 ,
132+ all_manifest_file_metas.begin (), all_manifest_file_metas.end (), int64_t { 0 } ,
133133 [](const int64_t sum, const ManifestFileMeta& manifest_file_meta) {
134134 return sum + manifest_file_meta.NumAddedFiles () - manifest_file_meta.NumDeletedFiles ();
135135 });
@@ -138,7 +138,7 @@ Result<std::shared_ptr<FileStoreScan::RawPlan>> FileStoreScan::CreatePlan() cons
138138 std::chrono::high_resolution_clock::now () - started)
139139 .count ());
140140 metrics_->SetCounter (ScanMetrics::LAST_SCANNED_SNAPSHOT_ID ,
141- snapshot.has_value () ? snapshot.value ().Id () : 0 );
141+ snapshot.has_value () ? snapshot.value ().Id () : int64_t { 0 } );
142142 metrics_->SetCounter (ScanMetrics::LAST_SCANNED_MANIFESTS , filtered_manifest_file_metas.size ());
143143 metrics_->SetCounter (ScanMetrics::LAST_SCAN_SKIPPED_TABLE_FILES ,
144144 all_data_files - manifest_entries.size ());
@@ -151,14 +151,15 @@ Status FileStoreScan::ReadManifests(std::optional<Snapshot>* snapshot_ptr,
151151 std::vector<ManifestFileMeta>* all_manifests_ptr,
152152 std::vector<ManifestFileMeta>* filter_manifests_ptr) const {
153153 auto & snapshot = *snapshot_ptr;
154- auto & filtered_manifests = *filter_manifests_ptr;
155154 auto & all_manifests = *all_manifests_ptr;
155+ auto & filtered_manifests = *filter_manifests_ptr;
156156 if (specified_snapshot_ != std::nullopt ) {
157157 snapshot = specified_snapshot_;
158158 } else {
159159 PAIMON_ASSIGN_OR_RAISE (snapshot, snapshot_manager_->LatestSnapshot ());
160160 }
161161 if (snapshot == std::nullopt ) {
162+ all_manifests = std::vector<ManifestFileMeta>();
162163 filtered_manifests = std::vector<ManifestFileMeta>();
163164 return Status::OK ();
164165 }
0 commit comments