MaxGekk commented on code in PR #56545:
URL: https://github.com/apache/spark/pull/56545#discussion_r3475817935
##########
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:
This `unresolvedColumnError` call changed its `proposal` from
`child.output.map(_.name)` (unqualified, output order) to a similarity-ordered,
qualified list. It's a reasonable alignment with standard Spark UX, but it's an
incidental behavior change for the "column not found" error that the PR
description doesn't mention (it frames the extraction as "rule behavior
unchanged" and documents only the `BIN_BY_REQUIRES_TOP_LEVEL_COLUMN`
refinement), and no test covers it — `ResolveBinBySuite` only updates the
TOP_LEVEL expectation.
Either document it and add a test asserting the new suggestion list, or
revert it to keep this groundwork PR purely behavior-preserving and do the UX
change in a follow-up. Is the change intentional? Non-blocking.
--
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]