JFinis opened a new issue, #9714: URL: https://github.com/apache/iceberg/issues/9714
### Apache Iceberg version 1.4.3 (latest release) ### Query engine Other ### Please describe the bug 🐞 The partition transforms are underspecified in the Iceberg specification: - hour, day, month, year: It is not specified how these functions should round and handle negative values. E.g., year specifies "Extract a date or timestamp year, as years from 1970". Now assume the date 1969-12-31. How many years is this date from 1970? It is one day from 1970, so the answer is "something between -1 and 0". The correct answer per the implementation is -1. The spec should reflect this. Same for all the other functions. - `hour` can overflow and will produce negative results for very large dates, as seperately reported [here](https://github.com/apache/iceberg/issues/9713). This is likely unintended, as it makes the function no longer be order preserving. Yet, it is the way it is. Either it has to stay this way, or it should be fixed. In any case, it must be specified what this function is supposed to return for timestamps or dates which are more than 2^31 hours away from the epoch. -- 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.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