Hi Peter, Thanks for starting the discussion! I'm in favor of making use of Java 17 language. There isn't much we gain from dropping Java 11, if we keep the language target to 11. Features like pattern matching, text blocks, and sealed classes will help us to write cleaner and more maintainable code.
Approach (2) seems like a good compromise to minimize the disruption for organizations which backport changes and can't necessarily migrate to a new Java version mid-cycle. The only caveat I see is that some downstream project might not properly support Java 17. For example, we still support Flink 1.20, but Flink only has proper Java 17 support from Flink 2.0 on. Cheers, Max On Fri, Jan 30, 2026 at 9:47 AM Péter Váry <[email protected]> wrote: > > After dropping Java 11, we discussed whether we should start using the newer > language features now available to us [1]. The general sentiment was that we > should. > > Manu has since opened a large PR [2] that migrates all switch statements to > the new switch syntax. While this is a valuable improvement, the size and > scope of the change are quite disruptive. This is especially true for other > large, ongoing PRs and for teams that maintain internal forks of Iceberg. > > I see three possible ways forward: > > Bite the bullet now and do the migration in one large PR. > Wait until shortly before the release and merge the PR then. This could help > organizations that are closely tied to the Apache release cycle but tend to > cherry-pick changes mid-cycle. > Apply the new switch syntax incrementally, using it only in new code or when > the surrounding code is otherwise being modified. > > My preference would be option 1 or 2. I’m happy to review the code if we > decide to proceed in either of those directions, but I’d like to hear others’ > thoughts before we make any sweeping changes. > > Thanks, > Peter > > References: > > [1] Dev thread - Java 17 features > https://lists.apache.org/thread/b29jyys3lnr72dbscb5rlg9601c4hbh1 > [2] PR - Replace switch statement with switch expression > https://github.com/apache/iceberg/pull/15176
