Skip to content

Commit 3dc2b38

Browse files
committed
resolve some comments
1 parent 1b5d123 commit 3dc2b38

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/iceberg/manifest_reader.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ class ICEBERG_EXPORT ManifestListReader {
5555
/// \param file_path Path to the manifest list file.
5656
/// \return A Result containing the reader or an error.
5757
Result<std::unique_ptr<ManifestListReader>> CreateManifestListReader(
58-
const std::string_view& file_path) {
58+
std::string_view file_path) {
5959
return NotImplemented("CreateManifestListReader is not implemented yet.");
6060
}
6161

6262
/// \brief Creates a reader for a manifest file.
6363
/// \param file_path Path to the manifest file.
6464
/// \return A Result containing the reader or an error.
65-
Result<std::unique_ptr<ManifestReader>> CreateManifestReader(
66-
const std::string_view& file_path) {
65+
Result<std::unique_ptr<ManifestReader>> CreateManifestReader(std::string_view file_path) {
6766
return NotImplemented("CreateManifestReader is not implemented yet.");
6867
}
6968

src/iceberg/table_scan.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ TableScanBuilder::TableScanBuilder(std::shared_ptr<TableMetadata> table_metadata
131131

132132
TableScanBuilder& TableScanBuilder::WithColumnNames(
133133
std::vector<std::string> column_names) {
134-
column_names_.reserve(column_names.size());
135134
column_names_ = std::move(column_names);
136135
return *this;
137136
}
@@ -199,7 +198,7 @@ Result<std::unique_ptr<TableScan>> TableScanBuilder::Build() {
199198
return InvalidArgument("Schema {} in snapshot {} is not found",
200199
*snapshot->schema_id, snapshot->snapshot_id);
201200
}
202-
auto schema = *it;
201+
const auto& schema = *it;
203202

204203
if (column_names_.empty()) {
205204
context_.projected_schema = schema;
@@ -277,8 +276,8 @@ Result<std::vector<std::shared_ptr<FileScanTask>>> DataScan::PlanFiles() const {
277276
for (const auto& data_entry : data_entries) {
278277
auto matched_deletes = GetMatchedDeletes(*data_entry, delete_file_index);
279278
const auto& data_file = data_entry->data_file;
280-
tasks.emplace_back(std::make_shared<FileScanTask>(
281-
data_file, std::move(matched_deletes), std::move(residual)));
279+
tasks.emplace_back(
280+
std::make_shared<FileScanTask>(data_file, std::move(matched_deletes), residual));
282281
}
283282
return tasks;
284283
}

0 commit comments

Comments
 (0)