wroever commented on code in PR #1984:
URL: https://github.com/apache/iceberg-go/pull/1984#discussion_r4266829089


##########
manifest.go:
##########
@@ -2771,6 +2776,20 @@ func (d *dataFile) setFieldIDToDecimalScaleMap(m 
map[int]int) {
        d.fieldIDToDecimalScale = m
 }
 
+// normalizeFormat sets d.Format to the FileFormat constant matching its
+// decoded spelling, or returns an error if it names no known format.
+// Every Avro decode path must call it before the value is compared or
+// exposed.
+func (d *dataFile) normalizeFormat() error {
+       format, err := FileFormatFromString(string(d.Format))
+       if err != nil {
+               return fmt.Errorf("data file %q: %w", d.FilePath(), err)
+       }

Review Comment:
   Added in 
[64a2d31](https://github.com/apache/iceberg-go/pull/1984/changes/64a2d3128075db5957898cab77fb06c6571a8a69)



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