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: 1. *Bite the bullet now* and do the migration in one large PR. 2. *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. 3. A*pply 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
