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/06/10 02:47:43 UTC

[GitHub] [spark] linhongliu-db commented on a change in pull request #32842: [MINOR][SQL] No need to normolize name for built-in functions

linhongliu-db commented on a change in pull request #32842:
URL: https://github.com/apache/spark/pull/32842#discussion_r648810877



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
##########
@@ -198,12 +198,23 @@ trait SimpleFunctionRegistryBase[T] extends FunctionRegistryBase[T] with Logging
   override def registerFunction(
       name: FunctionIdentifier,
       info: ExpressionInfo,
-      builder: FunctionBuilder): Unit = synchronized {
+      builder: FunctionBuilder): Unit = {
     val normalizedName = normalizeFuncName(name)
+    internalRegisterFunction(normalizedName, info, builder)
+  }
+
+  /**
+   * Perform function registry without normalizing function identifier.
+   * This is used when registering built-in functions and doing `FunctionRegistry.clone()`
+   */
+  def internalRegisterFunction(

Review comment:
       we can't because it's used by other classes. like `TableFunctionRegistry `




-- 
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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org