jiaan.geng created SPARK-31393:
----------------------------------

             Summary: Show the correct alias in a more elegant way
                 Key: SPARK-31393
                 URL: https://issues.apache.org/jira/browse/SPARK-31393
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.1.0
            Reporter: jiaan.geng


Spark SQL exists some function no elegant implementation alias.
For example: BitwiseCount override the sql method
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 message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to