anchovYu commented on code in PR #41864: URL: https://github.com/apache/spark/pull/41864#discussion_r1254897374
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala: ########## @@ -894,8 +896,10 @@ object FunctionRegistry { since: Option[String] = None): (String, (ExpressionInfo, FunctionBuilder)) = { val info = FunctionRegistryBase.expressionInfo[T](name, since) val funcBuilder = (expressions: Seq[Expression]) => { - assert(expressions.forall(_.resolved), "function arguments must be resolved.") - val expr = builder.build(name, expressions) + val rearrangedExpressions = + SupportsNamedArguments.getRearrangedExpressions[T](expressions, name) Review Comment: Does it work? Most `ExpressionBuilder` is an object, e.g. `CeilExpressionBuilder`, `FloorExpressionBuilder`. Does the `SupportsNamedArguments.getRearrangedExpressions` code work when T is an object? Actually I think we can leave out the support for expression builder in this PR for now. Most expression builder is used only when it has complicated initializer, e.g. build with one param and build with two params. That may require at least two function signatures, or a refactor on the existing code to make it use requires one signature. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org