beliefer opened a new pull request #28164: [SPARK-31393][SQL] Show the correct 
alias in a more elegant way that override the prettyName 
URL: https://github.com/apache/spark/pull/28164
 
 
   ### What changes were proposed in this pull request?
   Spark SQL exists some function no elegant implementation.
   For example: `BitwiseCount` override the sql method show below:
   `override def sql: String = s"bit_count(${child.sql})"`
   I don't think it's elegant enough.
   Because `Expression` gives the following definitions.
   ```
   def sql: String =
   { val childrenSQL = children.map(_.sql).mkString(", ") 
s"$prettyName($childrenSQL)" }
   ```
   By this definition, `BitwiseCount` should override `prettyName` method.
   This PR will correct the issue for some function as follows:
   
   - `TimeWindow`
   - `MaxBy`
   - `MinBy`
   - `UnaryMinus`
   - `BitwiseCount`
   
   ### Why are the changes needed?
   Improve the implement of some expression.
   
   
   ### Does this PR introduce any user-facing change?
    'No'
   
   
   ### How was this patch tested?
   Jenkins test.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to