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



##########
File path: 
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkTableUtil.java
##########
@@ -178,12 +179,14 @@ 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();
+        partitionFilter.forEach((key, value) -> 
builder.$plus$eq(Tuple2.apply(key, value)));

Review comment:
       This does look much better. Thank you!




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