viirya commented on a change in pull request #31966:
URL: https://github.com/apache/spark/pull/31966#discussion_r619741567



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
##########
@@ -276,6 +276,16 @@ object GeneratorNestedColumnAliasing {
           val pushedThrough = Project(NestedColumnAliasing
             .getNewProjectList(projectList, nestedFieldsNotOnGenerator), 
newChild)
 
+          // If the generator output is `ArrayType`, we cannot push through 
the extractor.
+          // It is because we don't allow field extractor on two-level array,
+          // i.e., attr.field when attr is a ArrayType(ArrayType(...)).
+          // Similarily, we also cannot push through if the child of generator 
is `MapType`.
+          g.generator.children.head.dataType match {

Review comment:
       Thank you!




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