|
31 | 31 | #include "iceberg/partition_spec.h" |
32 | 32 | #include "iceberg/schema.h" |
33 | 33 | #include "iceberg/table_scan.h" |
| 34 | +#include "iceberg/util/checked_cast.h" |
34 | 35 | #include "iceberg/util/content_file_util.h" |
35 | 36 | #include "iceberg/util/macros.h" |
36 | 37 |
|
@@ -109,8 +110,7 @@ ManifestGroup& ManifestGroup::FilterPartitions(std::shared_ptr<Expression> filte |
109 | 110 |
|
110 | 111 | ManifestGroup& ManifestGroup::FilterManifestEntries( |
111 | 112 | std::function<bool(const ManifestEntry&)> predicate) { |
112 | | - auto old_predicate = std::move(manifest_entry_predicate_); |
113 | | - manifest_entry_predicate_ = [old_predicate = std::move(old_predicate), |
| 113 | + manifest_entry_predicate_ = [old_predicate = std::move(manifest_entry_predicate_), |
114 | 114 | predicate = |
115 | 115 | std::move(predicate)](const ManifestEntry& entry) { |
116 | 116 | return old_predicate(entry) && predicate(entry); |
@@ -179,7 +179,7 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> ManifestGroup::PlanFiles() { |
179 | 179 | std::vector<std::shared_ptr<FileScanTask>> file_tasks; |
180 | 180 | file_tasks.reserve(tasks.size()); |
181 | 181 | for (auto& task : tasks) { |
182 | | - file_tasks.push_back(std::static_pointer_cast<FileScanTask>(task)); |
| 182 | + file_tasks.push_back(internal::checked_pointer_cast<FileScanTask>(task)); |
183 | 183 | } |
184 | 184 | return file_tasks; |
185 | 185 | } |
@@ -320,7 +320,8 @@ ManifestGroup::ReadEntries() { |
320 | 320 | ICEBERG_ASSIGN_OR_RAISE(auto manifest_evaluator, get_manifest_evaluator(spec_id)); |
321 | 321 | ICEBERG_ASSIGN_OR_RAISE(bool should_match, manifest_evaluator->Evaluate(manifest)); |
322 | 322 | if (!should_match) { |
323 | | - continue; // Skip this manifest because it doesn't match partition filter |
| 323 | + // Skip this manifest because it doesn't match partition filter |
| 324 | + continue; |
324 | 325 | } |
325 | 326 |
|
326 | 327 | if (ignore_deleted_) { |
|
0 commit comments