uros-b commented on code in PR #57629: URL: https://github.com/apache/spark/pull/57629#discussion_r3689605012
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InsertMapSortExpression.scala: ########## Review Comment: Nit: rawDistinctExpressionAliases, existingAliases and expressionAliases are hard to tell apart at the call site; the three-argument call reads ambiguously. Clearer names would help, plus a one-line comment explaining why the extra Project exists at all: insertMapSortRecursively re-references its input once per struct field and array element, so a complex distinct argument would otherwise be evaluated many times over. -- 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]
