jhump commented on PR #423: URL: https://github.com/apache/iceberg-go/pull/423#issuecomment-2858838586
Hmm, ok. The [spec](https://iceberg.apache.org/spec/#partition-transforms) states that the result type of the day transform is `int`. And, per the spec for [representing these in Avro](https://iceberg.apache.org/spec/#avro), that the resulting Avro schema type (for the partition type in a manifest file) should just be `int`, without the date logical type. > so that the transformation to a string happens properly Where does it need to be transformed to a string? The implementations of `DayTransform.Transformer`, `DayTransform.Apply`, and `DayTransform.ToHumanStr` all return/require `int32` values, not `Date`. So this feels very inconsistent. I ran into an issue with this when using `Transformer` to compute a partition file and storing that in a manifest entry: it was an `int32` result, and encoding to Avro was unhappy because the computed partition schema wanted a `Date` instead. (At least I think that's what happened; I had to make this change in a fork to get day transforms working, but my recollection could be incorrect.) I suppose an alternate fix in my own code base would be to special-case this transform and explicitly convert the result value to `Date`, but that seems problematic that it requires special-casing that way to correctly build a manifest. -- 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