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

    https://github.com/apache/spark/pull/20827#discussion_r175125352
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -287,7 +287,8 @@ trait RuntimeReplaceable extends UnaryExpression with 
Unevaluable {
     trait NonSQLExpression extends Expression {
       final override def sql: String = {
         transform {
    -      case a: Attribute => new PrettyAttribute(a)
    +      case a: Attribute => new PrettyNamedExpression(a)
    +      case a: Alias => new PrettyNamedExpression(a.sql, a.dataType)
    --- End diff --
    
    `case a: NamedExpression => new PrettyNamedExpression(a)`
    
    Move all the processing logics in `PrettyNamedExpression `


---

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

Reply via email to