Github user rberenguel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17100#discussion_r107354055
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
 ---
    @@ -337,11 +337,29 @@ trait CheckAnalysis extends PredicateHelper {
             operator match {
               case o if o.children.nonEmpty && o.missingInput.nonEmpty =>
                 val missingAttributes = o.missingInput.mkString(",")
    -            val input = o.inputSet.mkString(",")
    +            val availableAttributes = o.inputSet.mkString(",")
    +            val missingAttributesHelper = o.missingInput.map(a => (a.name, 
a.exprId.id))
    +
    +            val availableAttributesHelper = o.inputSet.map(a => (a.name, 
a.exprId.id))
    +
    +            val common = (missingAttributesHelper ++ 
availableAttributesHelper).groupBy(_._1)
    +            val commonNames = common.map(x => (x._1, x._2.toSet))
    +              .filter(_._2.size > 1)
    +              .map(_._1)
    +
    +            val repeatedNameHint = if (commonNames.size > 0) {
    +              s"\n|Observe that attribute(s) ${commonNames.mkString(",")} 
appear in your " +
    +                "query with at least two different hashes, but same name."
    --- End diff --
    
    Good point!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to