vranes commented on code in PR #56545:
URL: https://github.com/apache/spark/pull/56545#discussion_r3480931604


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveBinBy.scala:
##########
@@ -162,13 +87,16 @@ object ResolveBinBy extends Rule[LogicalPlan] {
       child.resolve(u.nameParts, resolver) match {
         case Some(a: Attribute) => a
         case _ =>
-          throw QueryCompilationErrors.unresolvedColumnError(u.name, 
child.output.map(_.name))
+          throw QueryCompilationErrors.unresolvedColumnError(
+            u.name,
+            proposal = StringUtils.orderSuggestedIdentifiersBySimilarity(

Review Comment:
   It's intentional, I did it to align the error output of legacy resolver with 
the single-pass resolver.
   
   I've documented the change in the PR description and added a 
ResolveBinBySuite test case asserting the order in the suggestion list. Thanks 
for the suggestion!



-- 
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]

Reply via email to