Github user wzhfy commented on a diff in the pull request:
https://github.com/apache/spark/pull/17100#discussion_r146255861
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
---
@@ -270,12 +270,25 @@ trait CheckAnalysis extends PredicateHelper {
operator match {
case o if o.children.nonEmpty && o.missingInput.nonEmpty =>
+ val resolver = plan.conf.resolver
+ val attrsWithSameName = o.missingInput.filter { missing =>
+ o.inputSet.exists(input => resolver(missing.name,
input.name))
+ }
+ val repeatedNameHint = if (attrsWithSameName.nonEmpty) {
+ val commonNames = attrsWithSameName.map(_.name).mkString(",")
+ s"""|Please check attribute(s) `$commonNames`, they seem to
appear in two
+ |different input operators, with the same
name.""".stripMargin
--- End diff --
The message `two different` could be wrong (such as the test case). How
about changing the hint message:
```
Attribute(s) with the same name are found in the put: `$sameNames`. Please
check if the right attribute(s) are used.
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]