tanmayrauth commented on code in PR #1401:
URL: https://github.com/apache/iceberg-go/pull/1401#discussion_r3525790291
##########
manifest_test.go:
##########
@@ -1925,6 +1925,26 @@ func (m *ManifestTestSuite) TestManifestEntryBuilder() {
m.Assert().Equal(0, *data.SortOrderID())
}
+func (m *ManifestTestSuite) TestManifestEntryFileSequenceNumReturnsCopy() {
+ entryFileSeqNum := int64(10)
+ entry := &manifestEntry{
+ EntryStatus: EntryStatusADDED,
+ FileSeqNum: &entryFileSeqNum,
+ Data: &dataFile{Path: "/data/sample.parquet"},
+ }
+
+ got := entry.FileSequenceNum()
+ m.Require().NotNil(got)
+ m.Assert().Equal(entryFileSeqNum, *got)
+ *got = 20
+
+ current := entry.FileSequenceNum()
+ m.Require().NotNil(current)
+ m.Assert().Equal(int64(10), *current)
+ m.Assert().NotEqual(int64(20), *current)
Review Comment:
nit: these last two assertions are redundant with the Equal(int64(10),
*current) above — after that passes, both NotEqual(20) and
Equal(entryFileSeqNum) are already implied. Could drop them to keep the test
tight.
--
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]