dimas-b commented on code in PR #3178:
URL: https://github.com/apache/polaris/pull/3178#discussion_r2571924621


##########
plugins/spark/v3.5/spark/src/main/java/org/apache/polaris/spark/utils/PolarisCatalogUtils.java:
##########
@@ -125,10 +128,10 @@ public static Table loadV1SparkTable(
         new TableIdentifier(
             identifier.name(), Option.apply(namespacePath), 
Option.apply(catalogName));
 
-    scala.collection.immutable.Map<String, String> scalaOptions =
-        (scala.collection.immutable.Map<String, String>)
-            scala.collection.immutable.Map$.MODULE$.apply(
-                
scala.collection.JavaConverters.mapAsScalaMap(tableProperties).toSeq());
+    Builder<Tuple2<String, String>, scala.collection.immutable.Map<String, 
String>> mb =
+        Map$.MODULE$.newBuilder();
+    tableProperties.forEach((k, v) -> mb.$plus$eq(Tuple2.apply(k, v)));
+    scala.collection.immutable.Map<String, String> scalaOptions = mb.result();

Review Comment:
   I tried `CollectionConverters` but hit compatibility issues between scala 
2.12 and 2.13 :shrug: 
   
   @tmater : if you have a working code for both scala versions that Polaris 
uses - please open a PR. I'd be happy to switch to `CollectionConverters`.



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