Copilot commented on code in PR #869:
URL: https://github.com/apache/iceberg-cpp/pull/869#discussion_r3699619845
##########
src/iceberg/test/rewrite_files_test.cc:
##########
@@ -83,18 +84,26 @@ class RewriteFilesTest : public MinimalUpdateTestBase {
return f;
}
- std::shared_ptr<DataFile> MakeDeleteFile(const std::string& path, int64_t
partition_x) {
- auto f = MakeDataFile(path, partition_x);
- f->content = DataFile::Content::kPositionDeletes;
- return f;
+ std::shared_ptr<DataFile> MakePositionDeleteFile(
+ const std::string& path, int64_t partition_x,
+ const std::string& referenced_data_file) {
+ auto file = MakeDataFile(path, partition_x);
+ file->content = DataFile::Content::kPositionDeletes;
+ if (table_->metadata()->format_version >= 3) {
+ file->file_format = FileFormatType::kPuffin;
+ file->referenced_data_file = referenced_data_file;
+ file->content_offset = 0;
+ file->content_size_in_bytes = 10;
+ }
+ return file;
}
Review Comment:
In v3, MakePositionDeleteFile marks the delete file as Puffin (i.e., a
deletion vector), but callers in SetUp pass a ".parquet" path. This makes the
test data internally inconsistent (Puffin DV with a Parquet-looking filename)
and diverges from the rest of the test suite where DV paths end with ".puffin".
Adjusting the helper to normalize the suffix in v3 keeps fixtures consistent
and avoids masking bugs in any code that might later start keying behavior off
filenames.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]