Skip to content

Commit ae560f3

Browse files
committed
remove Snapshot::kInitialSequenceNumber
1 parent 29e8865 commit ae560f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/iceberg/snapshot.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ struct ICEBERG_EXPORT DataOperation {
225225
/// Snapshots are created by table operations.
226226
struct ICEBERG_EXPORT Snapshot {
227227
static constexpr int64_t kInvalidSnapshotId = -1;
228-
static constexpr int64_t kInitialSequenceNumber = 0;
229228

230229
/// A unique long ID.
231230
int64_t snapshot_id;

src/iceberg/table_scan.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "iceberg/schema_field.h"
3030
#include "iceberg/snapshot.h"
3131
#include "iceberg/table.h"
32+
#include "iceberg/table_metadata.h"
3233
#include "iceberg/util/macros.h"
3334

3435
namespace iceberg {
@@ -45,7 +46,7 @@ struct DeleteFileIndex {
4546

4647
for (const auto& entry : entries) {
4748
const int64_t seq_num =
48-
entry->sequence_number.value_or(Snapshot::kInitialSequenceNumber);
49+
entry->sequence_number.value_or(TableMetadata::kInitialSequenceNumber);
4950
sequence_index.emplace(seq_num, entry.get());
5051
}
5152
}
@@ -56,7 +57,7 @@ struct DeleteFileIndex {
5657

5758
// Use lower_bound for efficient range search
5859
auto data_sequence_number =
59-
data_entry.sequence_number.value_or(Snapshot::kInitialSequenceNumber);
60+
data_entry.sequence_number.value_or(TableMetadata::kInitialSequenceNumber);
6061
for (auto it = sequence_index.lower_bound(data_sequence_number);
6162
it != sequence_index.end(); ++it) {
6263
// Additional filtering logic here

0 commit comments

Comments
 (0)