wroever commented on code in PR #1984:
URL: https://github.com/apache/iceberg-go/pull/1984#discussion_r4266830713
##########
data_file_codec_test.go:
##########
@@ -93,6 +93,47 @@ func TestDataFileCodecWithDroppedPartitionSource(t
*testing.T) {
require.Equal(t, map[int]any{1000: nil, 1001: int32(3)},
decoded.Partition())
}
+func TestUnmarshalAvroDataFileEntryNormalizesFileFormat(t *testing.T) {
+ spec := NewPartitionSpec()
+ schema := NewSchema(0)
+
+ tests := []struct {
+ name string
+ written FileFormat
+ expected FileFormat
+ errorContains string
+ }{
+ {name: "spec lowercase", written: "parquet", expected:
ParquetFile},
+ {name: "mixed case", written: "Parquet", expected: ParquetFile},
+ {name: "uppercase", written: ParquetFile, expected:
ParquetFile},
+ {name: "lowercase orc", written: "orc", expected: OrcFile},
+ {name: "unknown format", written: "csv", errorContains:
"unknown file format: csv"},
+ {name: "empty format", written: "", errorContains: "unknown
file format: "},
+ }
Review Comment:
Revisited 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]