cloud-fan commented on code in PR #46475:
URL: https://github.com/apache/spark/pull/46475#discussion_r1594905571
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -955,7 +955,14 @@ 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 (lambdas, others) =
expressions.partition(_.isInstanceOf[LambdaFunction])
+ if (lambdas.nonEmpty && !builder.supportsLambda) {
+ throw new AnalysisException(
+ errorClass =
"INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION",
+ messageParameters = Map(
+ "class" -> builder.getClass.getCanonicalName))
Review Comment:
I don't think so, a builder can even create different expressions based on
the input data types.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]