Skip to content

Commit 28c8048

Browse files
committed
try to fix last test
1 parent 963e7fe commit 28c8048

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergIterator.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ std::optional<ManifestFileEntry> SingleThreadIcebergKeysIterator::next()
135135
data_snapshot->manifest_list_entries[manifest_file_index].added_sequence_number,
136136
data_snapshot->manifest_list_entries[manifest_file_index].added_snapshot_id,
137137
secondary_storages);
138+
current_files = files_generator(current_manifest_file_content);
138139
internal_data_index = 0;
139140
}
140-
const auto & files = files_generator(current_manifest_file_content);
141-
while (internal_data_index < files.size())
141+
while (internal_data_index < current_files.size())
142142
{
143-
const auto & manifest_file_entry = files[internal_data_index++];
143+
const auto & manifest_file_entry = current_files[internal_data_index++];
144144
if ((manifest_file_entry.schema_id != previous_entry_schema) && (use_partition_pruning))
145145
{
146146
previous_entry_schema = manifest_file_entry.schema_id;
@@ -175,6 +175,7 @@ std::optional<ManifestFileEntry> SingleThreadIcebergKeysIterator::next()
175175
}
176176
}
177177
current_manifest_file_content = nullptr;
178+
current_files.clear();
178179
current_pruner = std::nullopt;
179180
++manifest_file_index;
180181
internal_data_index = 0;

src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergIterator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class SingleThreadIcebergKeysIterator
6969
size_t manifest_file_index = 0;
7070
size_t internal_data_index = 0;
7171
Iceberg::ManifestFilePtr current_manifest_file_content;
72+
std::vector<ManifestFileEntry> current_files;
7273
Int32 previous_entry_schema = -1;
7374
std::optional<Iceberg::ManifestFilesPruner> current_pruner;
7475

0 commit comments

Comments
 (0)