gemini-code-assist[bot] commented on code in PR #38488:
URL: https://github.com/apache/beam/pull/38488#discussion_r3236351405
##########
sdks/java/io/expansion-service/build.gradle:
##########
@@ -83,12 +83,10 @@ dependencies {
permitUnusedDeclared project(":sdks:java:extensions:kafka-factories")
runtimeOnly project(":sdks:java:io:amazon-web-services2") // FileSystem may
be used by Iceberg AddFiles
- if (JavaVersion.current().compareTo(JavaVersion.VERSION_11) >= 0 &&
project.findProperty('testJavaVersion') != '8') {
- // iceberg ended support for Java 8 in 1.7.0
- runtimeOnly project(":sdks:java:io:iceberg")
- runtimeOnly project(":sdks:java:io:iceberg:hive")
- runtimeOnly project(path: ":sdks:java:io:iceberg:bqms", configuration:
"shadow")
- }
+ runtimeOnly project(":sdks:java:io:iceberg")
+ runtimeOnly project(":sdks:java:io:iceberg:hive")
+ runtimeOnly project(path: ":sdks:java:io:iceberg:bqms", configuration:
"shadow")
+ runtimeOnly library.java.bigdataoss_util_hadoop
Review Comment:

The Java 8 compatibility guard for Iceberg dependencies has been removed. As
noted in the previous comment (which was also removed), Iceberg 1.7.0+ requires
Java 11. Removing this check will cause the expansion service to attempt to
load these dependencies on Java 8 environments, leading to
`UnsupportedClassVersionError`. Unless Java 8 support is being intentionally
dropped for the expansion service in this PR, these dependencies—including the
newly added `bigdataoss_util_hadoop` which is required for Iceberg's GCS
support—should remain within the version check.
```
if (JavaVersion.current().compareTo(JavaVersion.VERSION_11) >= 0 &&
project.findProperty('testJavaVersion') != '8') {
// iceberg ended support for Java 8 in 1.7.0
runtimeOnly project(":sdks:java:io:iceberg")
runtimeOnly project(":sdks:java:io:iceberg:hive")
runtimeOnly project(path: ":sdks:java:io:iceberg:bqms", configuration:
"shadow")
runtimeOnly library.java.bigdataoss_util_hadoop
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]