File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -321,36 +321,30 @@ ManifestGroup::ReadEntries() {
321321 ICEBERG_ASSIGN_OR_RAISE (bool should_match, manifest_evaluator->Evaluate (manifest));
322322 if (!should_match) {
323323 // Skip this manifest because it doesn't match partition filter
324- scan_counters_.skipped_data_manifests ++;
325324 continue ;
326325 }
327326
328327 if (ignore_deleted_) {
329328 // only scan manifests that have entries other than deletes
330329 if (!manifest.has_added_files () && !manifest.has_existing_files ()) {
331- scan_counters_.skipped_data_manifests ++;
332330 continue ;
333331 }
334332 }
335333
336334 if (ignore_existing_) {
337335 // only scan manifests that have entries other than existing
338336 if (!manifest.has_added_files () && !manifest.has_deleted_files ()) {
339- scan_counters_.skipped_data_manifests ++;
340337 continue ;
341338 }
342339 }
343340
344- scan_counters_.scanned_data_manifests ++;
345-
346341 // Read manifest entries
347342 ICEBERG_ASSIGN_OR_RAISE (auto reader, MakeReader (manifest));
348343 ICEBERG_ASSIGN_OR_RAISE (auto entries,
349344 ignore_deleted_ ? reader->LiveEntries () : reader->Entries ());
350345
351346 for (auto & entry : entries) {
352347 if (ignore_existing_ && entry.status == ManifestStatus::kExisting ) {
353- scan_counters_.skipped_data_files ++;
354348 continue ;
355349 }
356350
@@ -360,7 +354,6 @@ ManifestGroup::ReadEntries() {
360354 }
361355
362356 if (!manifest_entry_predicate_ (entry)) {
363- scan_counters_.skipped_data_files ++;
364357 continue ;
365358 }
366359
Original file line number Diff line number Diff line change 3939
4040namespace iceberg {
4141
42- // / \brief Counters for tracking scan metrics during manifest processing.
43- struct ICEBERG_EXPORT ScanMetricsCounters {
44- int64_t scanned_data_manifests = 0 ;
45- int64_t skipped_data_manifests = 0 ;
46- int64_t scanned_delete_manifests = 0 ;
47- int64_t skipped_delete_manifests = 0 ;
48- int64_t skipped_data_files = 0 ;
49- int64_t skipped_delete_files = 0 ;
50- };
51-
5242// / \brief Context passed to task creation functions.
5343struct ICEBERG_EXPORT TaskContext {
5444 public:
@@ -130,9 +120,6 @@ class ICEBERG_EXPORT ManifestGroup : public ErrorCollector {
130120 // / \param column_ids Field IDs of columns whose statistics should be preserved.
131121 ManifestGroup& ColumnsToKeepStats (std::unordered_set<int32_t > column_ids);
132122
133- // / \brief Returns the scan metrics counters accumulated during plan operations.
134- const ScanMetricsCounters& scan_counters () const { return scan_counters_; }
135-
136123 // / \brief Plan scan tasks for all matching data files.
137124 Result<std::vector<std::shared_ptr<FileScanTask>>> PlanFiles ();
138125
@@ -175,7 +162,6 @@ class ICEBERG_EXPORT ManifestGroup : public ErrorCollector {
175162 bool ignore_deleted_ = false ;
176163 bool ignore_existing_ = false ;
177164 bool ignore_residuals_ = false ;
178- ScanMetricsCounters scan_counters_;
179165};
180166
181167} // namespace iceberg
Original file line number Diff line number Diff line change 2222#include < atomic>
2323#include < cstdint>
2424#include < string_view>
25+ #include < utility>
2526
2627#include " iceberg/iceberg_export.h"
2728
Original file line number Diff line number Diff line change @@ -535,9 +535,7 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> DataTableScan::PlanFiles() co
535535 manifest_group->IgnoreResiduals ();
536536 }
537537
538- ICEBERG_ASSIGN_OR_RAISE (auto tasks, manifest_group->PlanFiles ());
539-
540- return tasks;
538+ return manifest_group->PlanFiles ();
541539}
542540
543541// IncrementalAppendScan implementation
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ struct TableScanContext {
129129 std::optional<int64_t > to_snapshot_id;
130130 std::string branch{};
131131 std::optional<int64_t > min_rows_requested;
132+
132133 // Validate the context parameters to see if they have conflicts.
133134 [[nodiscard]] Status Validate () const ;
134135};
Original file line number Diff line number Diff line change 1919 */
2020#include " iceberg/transaction.h"
2121
22- #include < chrono>
2322#include < format>
2423#include < memory>
2524#include < optional>
5150#include " iceberg/util/checked_cast.h"
5251#include " iceberg/util/location_util.h"
5352#include " iceberg/util/macros.h"
54- #include " iceberg/util/string_util.h"
5553
5654namespace iceberg {
5755
@@ -341,6 +339,7 @@ Result<std::shared_ptr<Table>> Transaction::Commit() {
341339 ICEBERG_CHECK (!committed_, " Transaction already committed" );
342340 ICEBERG_CHECK (last_update_committed_,
343341 " Cannot commit transaction when previous update is not committed" );
342+
344343 const auto & updates = ctx_->metadata_builder ->changes ();
345344 if (updates.empty ()) {
346345 committed_ = true ;
@@ -375,6 +374,7 @@ Result<std::shared_ptr<Table>> Transaction::Commit() {
375374 // Mark as committed and update table reference
376375 committed_ = true ;
377376 ctx_->table = std::move (commit_result.value ());
377+
378378 return ctx_->table ;
379379}
380380
Original file line number Diff line number Diff line change 2020
2121#pragma once
2222
23- #include < chrono>
2423#include < cstdint>
2524#include < memory>
2625#include < optional>
You can’t perform that action at this time.
0 commit comments