You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2023/10/08 08:36:37 UTC

[PR] [SPARK-45460][SQL] Replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters` [spark]

panbingkun opened a new pull request, #43275:
URL: https://github.com/apache/spark/pull/43275

   ### What changes were proposed in this pull request?
   The pr aims to replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters`.
   
   ### Why are the changes needed?
   
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   Pass GA.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45460][SQL] Replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters` [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #43275:
URL: https://github.com/apache/spark/pull/43275#discussion_r1349831045


##########
connector/connect/common/src/main/scala/org/apache/spark/sql/connect/common/DataTypeProtoConverter.scala:
##########
@@ -98,7 +98,7 @@ object DataTypeProtoConverter {
   }
 
   private def toCatalystStructType(t: proto.DataType.Struct): StructType = {
-    val fields = t.getFieldsList.toSeq.map { protoField =>
+    val fields = t.getFieldsList.asScala.toSeq.map { protoField =>

Review Comment:
   Although it's unrelated to this PR, it might be better to use `t.getFieldsList.asScala.toArray` here. This way, we can save a collection type conversion when building the `StructType` later.



-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45460][SQL] Replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters` [spark]

Posted by "panbingkun (via GitHub)" <gi...@apache.org>.
panbingkun commented on PR #43275:
URL: https://github.com/apache/spark/pull/43275#issuecomment-1751966356

   This pr is somewhat similar to pr https://github.com/apache/spark/pull/43126, but there is another deprecated class `scala.collection.convert.ImplicitConversions`.
   
   cc @srowen @LuciferYang 


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-45460][SQL] Replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters` [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #43275: [SPARK-45460][SQL] Replace `scala.collection.convert.ImplicitConversions` to `scala.jdk.CollectionConverters`
URL: https://github.com/apache/spark/pull/43275


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org