Hey folks,

While reviewing a PR to fix DayTransform in PyIceberg (#1208
<https://github.com/apache/iceberg-python/pull/1208>), we found an
inconsistency between the spec and the Java Iceberg library.

According to the spec
<https://iceberg.apache.org/spec/#partition-transforms>, the result type
for the "day partition transform" should be `int`, similar to other
time-based partition transforms (year/month/hour). However, in the Java
Iceberg library, the result type for day partition transform is `DateType` (
source
<https://github.com/apache/iceberg/blob/dddb5f423b353d961b8a08eb2cb4371d453c2959/api/src/main/java/org/apache/iceberg/transforms/Days.java#L47>).
This seems to be a discrepancy from the spec, as the day partition
transform is the only time-based transform with a non-int result
type—whereas the others use IntegerType (source
<https://grep.app/search?q=getResultType&filter[repo][0]=apache/iceberg&filter[path][0]=api/src/main/java/org/apache/iceberg/>
).

Could someone confirm if my understanding is correct? If so, is there any
historical context for this difference? Lastly, how should we approach
resolving this moving forward?

Best,
Kevin

Reply via email to