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 2021/11/09 05:28:02 UTC
[GitHub] [spark] linhongliu-db commented on a change in pull request #34528: [SPARK-37202][SQL] Treat `injectedFunctions` as custom built-in functions
linhongliu-db commented on a change in pull request #34528:
URL: https://github.com/apache/spark/pull/34528#discussion_r745298702
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -205,6 +222,22 @@ trait SimpleFunctionRegistryBase[T] extends FunctionRegistryBase[T] with Logging
internalRegisterFunction(normalizedName, info, builder)
}
+ override def registerCustomBuiltinFunction(
+ name: FunctionIdentifier,
+ info: ExpressionInfo,
+ builder: FunctionBuilder): Unit = {
+ // We didn't do any check when replacing a function even if it's a builtin one.
+ // So no need to do any extra check here.
+ if (name.database.isEmpty) {
Review comment:
we actually shouldn't allow function with a database here. Not sure if it's necessary to add a check here because it may break existing use cases.
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org