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

    https://github.com/apache/spark/pull/17185#discussion_r208078754
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/namedExpressions.scala
 ---
    @@ -201,7 +204,7 @@ case class Alias(child: Expression, name: String)(
       }
     
       override def sql: String = {
    -    val qualifierPrefix = qualifier.map(_ + ".").getOrElse("")
    +    val qualifierPrefix = if (qualifier.nonEmpty) qualifier.mkString(".") 
+ "." else ""
    --- End diff --
    
    This won't work for the case when we have Seq.empty.  The suffix "." gets 
returned even for a empty sequence. 
    For a non empty Seq, the above call will be fine. 
    
    Shall we leave the 'if' as is  or is there an equivalent preferred style 
that would work? 


---

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

Reply via email to