zeroshade commented on code in PR #118: URL: https://github.com/apache/iceberg-go/pull/118#discussion_r1720008416
########## manifest.go: ########## @@ -583,6 +597,51 @@ func avroColMapToMap[K comparable, V any](c *[]colMap[K, V]) map[K]V { return out } +func avroPartitionData(input map[string]any) map[string]any { + // hamba/avro2 will unmarshal a map[string]any such that + // each entry will actually be a map[string]interface{} with the key + // being the avro type. + // + // This means that partition data that looks like: + // + // [{"field-id": 1000, "name": "ts", "type": {"type": "int", "logicalType": "date"}}] + // + // Becomes: + // + // map[string]any{"ts": map[string]any{"int.date": time.Time{}}} Review Comment: Currently yes, the `hambra/avro` library doesn't return the field-id back to us at all. I think I can possibly leverage the https://pkg.go.dev/github.com/hamba/avro/v2#Schema object in the library to get the field-id property but I haven't spent enough time there yet to work out the best way to handle it. -- 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