gemini-code-assist[bot] commented on code in PR #38503:
URL: https://github.com/apache/beam/pull/38503#discussion_r3243859975


##########
sdks/java/io/expansion-service/build.gradle:
##########
@@ -83,12 +93,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:
   ![high](https://www.gstatic.com/codereviewagent/high-priority.svg)
   
   The removal of the Java 8 compatibility guard for Iceberg dependencies is a 
potential regression. Since Iceberg 1.7.0+ requires Java 11, including these 
dependencies unconditionally will cause the expansion service to fail when 
running in a Java 8 environment. If this release branch is intended to maintain 
Java 8 support, these dependencies should remain wrapped in 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
     }
   ```



##########
sdks/java/io/iceberg/build.gradle:
##########
@@ -59,7 +59,7 @@ dependencies {
     implementation "org.apache.iceberg:iceberg-parquet:$iceberg_version"
     implementation "org.apache.iceberg:iceberg-orc:$iceberg_version"
     implementation "org.apache.iceberg:iceberg-data:$iceberg_version"
-    implementation library.java.hadoop_common
+    implementation "org.apache.hadoop:hadoop-common:3.3.6"

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Avoid hardcoding the version string `3.3.6` directly in the dependency 
declaration. It is better to use the `library.java.hadoop_common` reference to 
maintain consistency with the rest of the project. The 
`resolutionStrategy.force` block defined later in this file (lines 125-128) 
will ensure that version 3.3.6 is used during dependency resolution.
   
   ```
       implementation library.java.hadoop_common
   ```



-- 
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]

Reply via email to