minyyy commented on a change in pull request #35850:
URL: https://github.com/apache/spark/pull/35850#discussion_r826169441
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/NestedColumnAliasing.scala
##########
@@ -395,12 +434,11 @@ object GeneratorNestedColumnAliasing {
val updatedGenerate = rewrittenG.copy(generatorOutput =
updatedGeneratorOutput)
// Replace nested column accessor with generator output.
- val attrExprIdsOnGenerator =
attrToExtractValuesOnGenerator.keys.map(_.exprId).toSet
+ val generateOutputAttrExprId =
attrToExtractValuesOnGenerator.keys.map(_.exprId).head
Review comment:
I changed the toSet and find way to toSet.head to make it clearer - we
should only have one generator output here.
--
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]