Skip to content

Commit 5248e22

Browse files
committed
fix lint
1 parent e1267fc commit 5248e22

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/iceberg/table_scan.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,18 @@ TableScanBuilder& TableScanBuilder::WithLimit(std::optional<int64_t> limit) {
121121
}
122122

123123
Result<std::unique_ptr<TableScan>> TableScanBuilder::Build() {
124-
std::shared_ptr<Snapshot> snapshot;
125124
if (snapshot_id_) {
126-
ICEBERG_ASSIGN_OR_RAISE(snapshot, table_.snapshot(*snapshot_id_));
125+
ICEBERG_ASSIGN_OR_RAISE(context_.snapshot, table_.snapshot(*snapshot_id_));
127126
} else {
128-
snapshot = table_.current_snapshot();
127+
context_.snapshot = table_.current_snapshot();
129128
}
130-
if (snapshot == nullptr) {
129+
if (context_.snapshot == nullptr) {
131130
return InvalidArgument("No snapshot found for table {}", table_.name());
132131
}
133-
context_.snapshot = std::move(snapshot);
134132

135133
if (!context_.projected_schema) {
136134
std::shared_ptr<Schema> schema;
135+
const auto& snapshot = context_.snapshot;
137136
if (snapshot->schema_id) {
138137
const auto& schemas = table_.schemas();
139138
if (const auto it = schemas.find(*snapshot->schema_id); it != schemas.end()) {
@@ -256,7 +255,7 @@ std::vector<ManifestEntry*> DataScan::DeleteFileIndex::FindRelevantEntries(
256255
}
257256

258257
std::vector<std::shared_ptr<DataFile>> DataScan::GetMatchedDeletes(
259-
const ManifestEntry& data_entry, const DeleteFileIndex& delete_file_index) const {
258+
const ManifestEntry& data_entry, const DeleteFileIndex& delete_file_index) {
260259
const auto relevant_entries = delete_file_index.FindRelevantEntries(data_entry);
261260
std::vector<std::shared_ptr<DataFile>> matched_deletes;
262261
if (relevant_entries.empty()) {

src/iceberg/table_scan.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ class ICEBERG_EXPORT DataScan : public TableScan {
197197
std::vector<ManifestEntry*> FindRelevantEntries(
198198
const ManifestEntry& data_entry) const;
199199
};
200-
std::vector<std::shared_ptr<DataFile>> GetMatchedDeletes(
201-
const ManifestEntry& data_entry, const DeleteFileIndex& delete_file_index) const;
200+
static std::vector<std::shared_ptr<DataFile>> GetMatchedDeletes(
201+
const ManifestEntry& data_entry, const DeleteFileIndex& delete_file_index);
202202
};
203203

204204
} // namespace iceberg

0 commit comments

Comments
 (0)