HyukjinKwon commented on a change in pull request #23349: [SPARK-26403][SQL] 
Support pivoting using array column for `pivot(column)` API
URL: https://github.com/apache/spark/pull/23349#discussion_r243487227
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/literals.scala
 ##########
 @@ -67,6 +67,7 @@ object Literal {
     case t: Timestamp => Literal(DateTimeUtils.fromJavaTimestamp(t), 
TimestampType)
     case d: Date => Literal(DateTimeUtils.fromJavaDate(d), DateType)
     case a: Array[Byte] => Literal(a, BinaryType)
+    case a: collection.mutable.WrappedArray[_] => apply(a.array)
 
 Review comment:
   I don't think we can easily support Seq with minimised change here - let me 
take another look for this. That's why I targeted to support an array column in 
pivot specifically. Maybe I can do the type check within pivot before we call 
Literal.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to