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

    https://github.com/apache/spark/pull/17100#discussion_r146544863
  
    --- 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 sameNames = attrsWithSameName.map(_.name).mkString(",")
    +              s"""Attribute(s) with the same name appear in the operation: 
`$sameNames`.
    +                  |Please check if the right attribute(s) are 
used.""".stripMargin
    --- End diff --
    
    I don't have a strong case for having two lines here, and I see the point 
of seeing it as one line. I guess the best way to have it as one line is 
splitting it into 
    ```scala
    val attributeRepetitionMsg = s"Attribute(s) with the same name appear in 
the operation: `$sameNames`"
    val checkAttributesMsg = s"Please check if the right attribute(s) are used."
    ```
    to avoid hitting the < 100 chars linting rule?


---

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

Reply via email to