Revanth14 commented on code in PR #1284:
URL: https://github.com/apache/iceberg-go/pull/1284#discussion_r3470782035
##########
schema_test.go:
##########
@@ -1177,6 +1199,47 @@ func TestSchemaWithGeometryGeographyTypes(t *testing.T) {
assert.True(t, schema.Equals(&unmarshaledSchema))
}
+func TestSchemaGeoTypeStringWireFormatFixture(t *testing.T) {
+ fixtureBytes, err := os.ReadFile(filepath.Join("testdata",
geoSchemaJavaFixtureName))
+ require.NoError(t, err, "fixture missing")
+
+ var schema iceberg.Schema
+ require.NoError(t, json.Unmarshal(fixtureBytes, &schema))
+
+ freshBytes, err := json.Marshal(&schema)
+ require.NoError(t, err)
+
+ fixtureTypes := rawTopLevelFieldTypes(t, fixtureBytes)
+ freshTypes := rawTopLevelFieldTypes(t, freshBytes)
+ require.Equal(t, fixtureTypes, freshTypes)
Review Comment:
Done. I replaced the broad map equality with explicit expected type strings
for each field, plus `require.Len` checks on both fixture and fresh maps so a
silently dropped or extra field still fails clearly.
--
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]