beliefer commented on a change in pull request #28154: [SPARK-31372][SQL] Check
the validity of built-in function aliases
URL: https://github.com/apache/spark/pull/28154#discussion_r405920818
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -529,7 +529,7 @@ object FunctionRegistry {
expression[BitwiseNot]("~"),
expression[BitwiseOr]("|"),
expression[BitwiseXor]("^"),
- expression[BitwiseCount]("bit_count"),
+ expression[BitwiseCount]("bit_count", true),
Review comment:
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, I judge legitimacy by comparing `prettyName` with alias.
----------------------------------------------------------------
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]