Skip to content

Commit 4e25c2c

Browse files
committed
address feedback
1 parent 22b3cba commit 4e25c2c

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/iceberg/constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ constexpr std::string_view kParquetFieldIdKey = "PARQUET:field_id";
3434
constexpr int64_t kInvalidSnapshotId = -1;
3535
/// \brief Stand-in for the current sequence number that will be assigned when the commit
3636
/// is successful. This is replaced when writing a manifest list by the ManifestFile
37-
/// wrapper
37+
/// adapter.
3838
constexpr int64_t kUnassignedSequenceNumber = -1;
3939

4040
// TODO(gangwu): move other commonly used constants here.

src/iceberg/manifest/manifest_group.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "iceberg/partition_spec.h"
3232
#include "iceberg/schema.h"
3333
#include "iceberg/table_scan.h"
34+
#include "iceberg/util/checked_cast.h"
3435
#include "iceberg/util/content_file_util.h"
3536
#include "iceberg/util/macros.h"
3637

@@ -109,8 +110,7 @@ ManifestGroup& ManifestGroup::FilterPartitions(std::shared_ptr<Expression> filte
109110

110111
ManifestGroup& ManifestGroup::FilterManifestEntries(
111112
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_),
114114
predicate =
115115
std::move(predicate)](const ManifestEntry& entry) {
116116
return old_predicate(entry) && predicate(entry);
@@ -179,7 +179,7 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> ManifestGroup::PlanFiles() {
179179
std::vector<std::shared_ptr<FileScanTask>> file_tasks;
180180
file_tasks.reserve(tasks.size());
181181
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));
183183
}
184184
return file_tasks;
185185
}
@@ -320,7 +320,8 @@ ManifestGroup::ReadEntries() {
320320
ICEBERG_ASSIGN_OR_RAISE(auto manifest_evaluator, get_manifest_evaluator(spec_id));
321321
ICEBERG_ASSIGN_OR_RAISE(bool should_match, manifest_evaluator->Evaluate(manifest));
322322
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;
324325
}
325326

326327
if (ignore_deleted_) {

0 commit comments

Comments
 (0)