viirya commented on a change in pull request #28556:
URL: https://github.com/apache/spark/pull/28556#discussion_r428473655
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
##########
@@ -204,15 +211,8 @@ object GeneratorNestedColumnAliasing {
g: Generate,
nestedFieldToAlias: Map[ExtractValue, Alias],
attrToAliases: Map[ExprId, Seq[Alias]]): LogicalPlan = {
- val newGenerator = g.generator.transform {
- case f: ExtractValue if nestedFieldToAlias.contains(f) =>
- nestedFieldToAlias(f).toAttribute
- }.asInstanceOf[Generator]
-
// Defer updating `Generate.unrequiredChildIndex` to next round of
`ColumnPruning`.
- val newGenerate = g.copy(generator = newGenerator)
-
- NestedColumnAliasing.replaceChildrenWithAliases(newGenerate, attrToAliases)
+ NestedColumnAliasing.replaceChildrenWithAliases(g, nestedFieldToAlias,
attrToAliases)
Review comment:
Changed the method name.
----------------------------------------------------------------
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]