fqaiser94 commented on a change in pull request #4009:
URL: https://github.com/apache/iceberg/pull/4009#discussion_r799492566



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java
##########
@@ -178,12 +179,16 @@ private SparkTableUtil() {
 
       Option<scala.collection.immutable.Map<String, String>> 
scalaPartitionFilter;
       if (partitionFilter != null && !partitionFilter.isEmpty()) {
-        scalaPartitionFilter = 
Option.apply(JavaConverters.mapAsScalaMapConverter(partitionFilter).asScala()
-            .toMap(Predef.conforms()));
+        Builder<Tuple2<String, String>, scala.collection.immutable.Map<String, 
String>> builder =
+            Map$.MODULE$.<String, String>newBuilder();
+        for (Map.Entry<String, String> entry : partitionFilter.entrySet()) {
+          builder.$plus$eq(Tuple2.apply(entry.getKey(), entry.getValue()));
+        }

Review comment:
       I've changed the code to use the `forEach` syntax (rather than `for () { 
... }`) so at least it looks a little less gnarly now :)
   




-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to