karenfeng commented on a change in pull request #32301:
URL: https://github.com/apache/spark/pull/32301#discussion_r619491896



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
##########
@@ -30,54 +30,61 @@ import org.apache.spark.sql.types._
  */
 object NestedColumnAliasing {
 
-  def unapply(plan: LogicalPlan): Option[LogicalPlan] = plan match {
+  def unapply(plan: LogicalPlan): Option[Map[Attribute, Seq[ExtractValue]]] = 
plan match {

Review comment:
       Right now, `unapply` returns a `None` instead of `Some(Map)` if all the 
nested fields are used. We won't fall through in this case if we only return 
the information needed to build a map. Let me change this around to see what 
would achieve the same behavior.




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

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