LuciferYang commented on code in PR #43178:
URL: https://github.com/apache/spark/pull/43178#discussion_r1402052993


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##########
@@ -915,15 +915,15 @@ case class MapObjects private(
   }
 
   private lazy val mapElements: scala.collection.Seq[_] => Any = 
customCollectionCls match {
-    case Some(cls) if classOf[WrappedArray[_]].isAssignableFrom(cls) =>
+    case Some(cls) if classOf[mutable.ArraySeq[_]].isAssignableFrom(cls) =>

Review Comment:
   ```
   Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 17.0.9).
   Type in expressions for evaluation. Or try :help.
   
   scala> classOf[scala.collection.mutable.WrappedArray[_]]
                 ^
          warning: type WrappedArray in package mutable is deprecated (since 
2.13.0): Use ArraySeq instead of WrappedArray; it can represent both, boxed and 
unboxed arrays
   val res0: Class[collection.mutable.WrappedArray[_]] = class 
scala.collection.mutable.ArraySeq
   
   scala> classOf[scala.collection.mutable.ArraySeq[_]]
   val res1: Class[scala.collection.mutable.ArraySeq[_]] = class 
scala.collection.mutable.ArraySeq
   ```
   
   Using the Scala 2.13 shell, 
`classOf[scala.collection.mutable.WrappedArray[_]]` and 
`classOf[scala.collection.mutable.ArraySeq[_]]` both return `class 
scala.collection.mutable.ArraySeq`, indicating that there is no actual 
`WrappedArray` type in Scala 2.13.
   
   



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala:
##########
@@ -915,15 +915,15 @@ case class MapObjects private(
   }
 
   private lazy val mapElements: scala.collection.Seq[_] => Any = 
customCollectionCls match {
-    case Some(cls) if classOf[WrappedArray[_]].isAssignableFrom(cls) =>
+    case Some(cls) if classOf[mutable.ArraySeq[_]].isAssignableFrom(cls) =>

Review Comment:
   ```scala
   Welcome to Scala 2.13.12 (OpenJDK 64-Bit Server VM, Java 17.0.9).
   Type in expressions for evaluation. Or try :help.
   
   scala> classOf[scala.collection.mutable.WrappedArray[_]]
                 ^
          warning: type WrappedArray in package mutable is deprecated (since 
2.13.0): Use ArraySeq instead of WrappedArray; it can represent both, boxed and 
unboxed arrays
   val res0: Class[collection.mutable.WrappedArray[_]] = class 
scala.collection.mutable.ArraySeq
   
   scala> classOf[scala.collection.mutable.ArraySeq[_]]
   val res1: Class[scala.collection.mutable.ArraySeq[_]] = class 
scala.collection.mutable.ArraySeq
   ```
   
   Using the Scala 2.13 shell, 
`classOf[scala.collection.mutable.WrappedArray[_]]` and 
`classOf[scala.collection.mutable.ArraySeq[_]]` both return `class 
scala.collection.mutable.ArraySeq`, indicating that there is no actual 
`WrappedArray` type in Scala 2.13.
   
   



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