You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/09 02:27:00 UTC
[GitHub] [spark] beliefer commented on a change in pull request #28154:
[SPARK-31372][SQL] Check the validity of built-in function aliases
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org