tmater commented on code in PR #3178:
URL: https://github.com/apache/polaris/pull/3178#discussion_r2571918823
##########
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:
What do you think about using `scala.jdk.javaapi.CollectionConverters`
instead of the original builder pattern here (and `JavaConverters` on line
142)? It's more concise, though the builder approach is more explicit.
--
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]