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



##########
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:
       Okay, so the problem is that we can't convert directly to an Immutable 
Scala map, and the Scala API's use of implicits makes converting mutable to 
immutable really difficult. That seems reasonable. I'm not sure what we were 
doing before... maybe we didn't need an Immutable map?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to