wgtmac commented on code in PR #869:
URL: https://github.com/apache/iceberg-cpp/pull/869#discussion_r3702548390
##########
src/iceberg/test/rewrite_files_test.cc:
##########
@@ -544,9 +564,10 @@ TEST_P(RewriteFilesFormatVersionTest, DataSequenceNumber) {
GTEST_SKIP() << "Requires format version >= 2";
}
CommitFileA();
+ const auto data_sequence_number = table_->metadata()->last_sequence_number;
ICEBERG_UNWRAP_OR_FAIL(auto rw, NewRewriteFiles());
- rw->SetDataSequenceNumber(5);
+ rw->SetDataSequenceNumber(data_sequence_number);
Review Comment:
This aligns the test with Java `TestRewriteFiles`: the replacement entry
should retain the pre-rewrite data sequence number, while the new manifest
receives the rewrite commit sequence. The previous hard-coded value 5 was
unrelated to the table state, so the test now captures `last_sequence_number`
after `CommitFileA()` and verifies both values.
--
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]