arnaudbriche commented on code in PR #307: URL: https://github.com/apache/iceberg-go/pull/307#discussion_r1959422260
########## utils.go: ########## @@ -238,3 +239,68 @@ func avroEncode[T any](key string, version int, vals []T, out io.Writer) error { return enc.Close() } + +func structTypeToAvroPartitionSchema(st *StructType) (avro.Schema, error) { + var aFields []*avro.Field + + for _, field := range st.Fields() { + aField, err := nestedFieldToAvroField(field) + + if err != nil { + return nil, err + } + + aFields = append(aFields, aField) + } + + return avro.NewRecordSchema("r102", "", aFields) Review Comment: Not sure. The spec seems not to enforce any specific name here. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org