Hi, Java 21 is the latest "LTS version" released GA in September 2023. Some Iceberg users already run with Java 21 on production (and FWIW Trino runs with 22 already) I thought it would be nice to add support for building and testing Iceberg with Java 21.
Conceptually this is simple (see PR <https://github.com/apache/iceberg/pull/10474>), but there is a caveat worth discussing: There seems to be no version of Google Java Format library that can run under JDK 8 and JDK 21. Choosing Google Java Format version dynamically is not an option, because different versions have slightly different formatting preferences, so updating formatter version requires updating the code in a handful of places. Question: do we want to add support for building and testing with Java 21? Ability to test with Java 21 would match what some of Iceberg users are doing. If we choose so, we would simply disable spotless formatter when build runs on Java 21 (or 8 if this is preferred instead) or we prefer to wait until we can drop Java 8 support <https://github.com/apache/iceberg/pull/10518> first, and only then add Java 21 support? Pre-existing context: the topic has been discussed on the PR here: https://github.com/apache/iceberg/pull/10474#discussion_r1658513019 and it was proposed there to bring this to Dev group attention. Best, PF