tanmayrauth commented on code in PR #1334:
URL: https://github.com/apache/iceberg-go/pull/1334#discussion_r3486663238


##########
manifest_test.go:
##########
@@ -2023,6 +2023,73 @@ func (m *ManifestTestSuite) 
TestV3ManifestListWriterPersistsPerManifestFirstRowI
        m.EqualValues(5022, *writer.NextRowID())
 }
 
+func (m *ManifestTestSuite) 
TestManifestListWriterMetadataPreservesInt64Values() {

Review Comment:
   1<<40 already proves the >2^32 case well. Might be worth also asserting a 
value up near math.MaxInt64 (a realistic snapshot id like 9223372036854775807), 
since that's the boundary a future regression to a
     32-bit path would corrupt first.



##########
manifest.go:
##########
@@ -1468,14 +1468,14 @@ func NewManifestListWriterV3(out io.Writer, snapshotId, 
sequenceNumber, firstRow
        }
        parentSnapshotStr := "null"
        if parentSnapshot != nil {
-               parentSnapshotStr = strconv.Itoa(int(*parentSnapshot))
+               parentSnapshotStr = strconv.FormatInt(*parentSnapshot, 10)
        }
 
        return m, m.init(map[string][]byte{
                "format-version":     []byte(strconv.Itoa(m.version)),

Review Comment:
   Nice that you caught first-row-id here too, not just the fields shared with 
v1/v2, FormatInt is the right call for all of these since they're all 64-bit 
per the spec.
   



-- 
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]

Reply via email to