cloud-fan commented on code in PR #49126:
URL: https://github.com/apache/spark/pull/49126#discussion_r1890216377
##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/catalog/SQLFunction.scala:
##########
@@ -56,10 +63,48 @@ case class SQLFunction(
assert((isTableFunc && returnType.isRight) || (!isTableFunc &&
returnType.isLeft))
override val language: RoutineLanguage = LanguageSQL
+
+ /**
+ * Optionally get the function body as an expression or query using the
given parser.
+ */
+ def getExpressionAndQuery(
+ parser: ParserInterface,
+ isTableFunc: Boolean): (Option[Expression], Option[LogicalPlan]) = {
Review Comment:
should it return `Either[Expression, LogicalPlan]`?
--
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]