cloud-fan commented on code in PR #55582:
URL: https://github.com/apache/spark/pull/55582#discussion_r3154073892
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ColumnResolutionHelper.scala:
##########
@@ -538,47 +538,63 @@ trait ColumnResolutionHelper extends Logging with
DataTypeErrorsBase {
// df1.select(df2.a) <- illegal reference df2.a
throw QueryCompilationErrors.cannotResolveDataFrameColumn(u)
}
- resolved.map(_._1)
+
+ // If there is at least one regular (`hidden = false`) candidate, run the
+ // merge over regular candidates only and ignore hidden ones (e.g. a
+ // natural/USING join hidden key). Otherwise run the merge over hidden
+ // candidates.
+ val (regular, hidden) = candidates.partition(!_.hidden)
+ val finalists = if (regular.nonEmpty) regular else hidden
Review Comment:
shall we check `regular` only?
--
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]