Skip to content

Commit 26525e4

Browse files
committed
fix: add explicit keyword and update method calls
- Add explicit keyword to ManifestReaderImpl and ManifestListReaderImpl constructors to prevent unintended implicit conversions - Update table_scan.cc to use the new Make method names instead of deprecated MakeReader methods
1 parent aaf679a commit 26525e4

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/iceberg/manifest_reader_internal.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ namespace iceberg {
3131
/// \brief Read manifest entries from a manifest file.
3232
class ManifestReaderImpl : public ManifestReader {
3333
public:
34-
ManifestReaderImpl(std::unique_ptr<Reader> reader, std::shared_ptr<Schema> schema,
35-
std::unique_ptr<InheritableMetadata> inheritable_metadata)
34+
explicit ManifestReaderImpl(std::unique_ptr<Reader> reader,
35+
std::shared_ptr<Schema> schema,
36+
std::unique_ptr<InheritableMetadata> inheritable_metadata)
3637
: schema_(std::move(schema)),
3738
reader_(std::move(reader)),
3839
inheritable_metadata_(std::move(inheritable_metadata)) {}
@@ -50,7 +51,8 @@ class ManifestReaderImpl : public ManifestReader {
5051
/// \brief Read manifest files from a manifest list file.
5152
class ManifestListReaderImpl : public ManifestListReader {
5253
public:
53-
ManifestListReaderImpl(std::unique_ptr<Reader> reader, std::shared_ptr<Schema> schema)
54+
explicit ManifestListReaderImpl(std::unique_ptr<Reader> reader,
55+
std::shared_ptr<Schema> schema)
5456
: schema_(std::move(schema)), reader_(std::move(reader)) {}
5557
ManifestListReaderImpl() = default;
5658

src/iceberg/table_scan.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,17 @@ DataTableScan::DataTableScan(TableScanContext context, std::shared_ptr<FileIO> f
147147
Result<std::vector<std::shared_ptr<FileScanTask>>> DataTableScan::PlanFiles() const {
148148
ICEBERG_ASSIGN_OR_RAISE(
149149
auto manifest_list_reader,
150-
ManifestListReader::MakeReader(context_.snapshot->manifest_list, file_io_));
150+
ManifestListReader::Make(context_.snapshot->manifest_list, file_io_));
151151
ICEBERG_ASSIGN_OR_RAISE(auto manifest_files, manifest_list_reader->Files());
152152

153153
std::vector<std::shared_ptr<FileScanTask>> tasks;
154154
ICEBERG_ASSIGN_OR_RAISE(auto partition_spec, context_.table_metadata->PartitionSpec());
155155
auto partition_schema = partition_spec->schema();
156156

157157
for (const auto& manifest_file : manifest_files) {
158-
ICEBERG_ASSIGN_OR_RAISE(auto manifest_reader,
159-
ManifestReader::MakeReader(manifest_file.manifest_path,
160-
file_io_, partition_schema));
158+
ICEBERG_ASSIGN_OR_RAISE(
159+
auto manifest_reader,
160+
ManifestReader::Make(manifest_file, file_io_, partition_schema));
161161
ICEBERG_ASSIGN_OR_RAISE(auto manifests, manifest_reader->Entries());
162162

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

0 commit comments

Comments
 (0)