uros-b commented on code in PR #57629: URL: https://github.com/apache/spark/pull/57629#discussion_r3689598011
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InsertMapSortExpression.scala: ########## @@ -17,18 +17,21 @@ package org.apache.spark.sql.catalyst.optimizer +import scala.collection.immutable.VectorMap Review Comment: Nit: scala.collection.immutable.VectorMap isn't used anywhere else in Spark. More to the point, the declared return type is a plain Map, which discards the insertion ordering the callers depend on for a deterministic Project column list; the ordering survives only because the runtime class happens to be a VectorMap. Either declare the ordered type or return a Seq[(Expression, NamedExpression)], so the guarantee is visible in the signature. -- 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]
