MaxGekk commented on code in PR #48658:
URL: https://github.com/apache/spark/pull/48658#discussion_r1816897282
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala:
##########
@@ -46,7 +47,9 @@ case class UnresolvedNamedLambdaVariable(nameParts:
Seq[String])
nameParts.map(n => if (n.contains(".")) s"`$n`" else n).mkString(".")
override def exprId: ExprId = throw new UnresolvedException("exprId")
- override def dataType: DataType = throw new UnresolvedException("dataType")
+ override def dataType: DataType = throw new SparkRuntimeException(
+ errorClass = "INVALID_LAMBDA_FUNCTION_CALL.NON_HIGHER_ORDER_FUNCTION",
Review Comment:
Could you clarify, please, why do you propose the error condition. IMHO, it
is related to the condition when Spark expects a higher-order function but got
something else.
Looking at the test, you are trying to fix another situation when a
higher-order functions is not expected at all.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/higherOrderFunctions.scala:
##########
@@ -46,7 +47,9 @@ case class UnresolvedNamedLambdaVariable(nameParts:
Seq[String])
nameParts.map(n => if (n.contains(".")) s"`$n`" else n).mkString(".")
override def exprId: ExprId = throw new UnresolvedException("exprId")
- override def dataType: DataType = throw new UnresolvedException("dataType")
+ override def dataType: DataType = throw new SparkRuntimeException(
Review Comment:
Sorry, why a runtime exception?
--
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]