Skip to content

Commit 82a488f

Browse files
dongxiao1198xiao.dong
andauthored
feat: pass partition schema to manifest reader (#157)
extract partition schema from table meta and pass it to manifest reader Co-authored-by: xiao.dong <[email protected]>
1 parent deead7a commit 82a488f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/iceberg/table_scan.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,13 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> DataTableScan::PlanFiles() co
151151
ICEBERG_ASSIGN_OR_RAISE(auto manifest_files, manifest_list_reader->Files());
152152

153153
std::vector<std::shared_ptr<FileScanTask>> tasks;
154+
ICEBERG_ASSIGN_OR_RAISE(auto partition_spec, context_.table_metadata->PartitionSpec());
155+
auto partition_schema = partition_spec->schema();
156+
154157
for (const auto& manifest_file : manifest_files) {
155-
ICEBERG_ASSIGN_OR_RAISE(
156-
auto manifest_reader,
157-
ManifestReader::MakeReader(manifest_file.manifest_path, file_io_,
158-
/* TODO(xiao.dong) partition schema*/ nullptr));
158+
ICEBERG_ASSIGN_OR_RAISE(auto manifest_reader,
159+
ManifestReader::MakeReader(manifest_file.manifest_path,
160+
file_io_, partition_schema));
159161
ICEBERG_ASSIGN_OR_RAISE(auto manifests, manifest_reader->Entries());
160162

161163
// TODO(gty404): filter manifests using partition spec and filter expression

0 commit comments

Comments
 (0)