arnavgupta03 commented on code in PR #52046: URL: https://github.com/apache/spark/pull/52046#discussion_r2284373910
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/package.scala: ########## @@ -122,7 +191,8 @@ package object expressions { * Returns the index of first attribute with a matching expression id, or -1 if no match exists. */ def indexOf(exprId: ExprId): Int = { - Option(exprIdToOrdinal.get(exprId)).getOrElse(-1) + val id = exprId.id + exprIdToOrdinal(id) Review Comment: Would we still be using lazy evaluation here? If so, the access to `attrsArray` would compute the arrays regardless, right? If not, would we be triggering the first evaluation through some method inside `indexOf`? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org