Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14656#discussion_r74854090
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
---
@@ -653,6 +653,19 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef]
with Logging {
}
/**
+ * Create a table-valued function call with arguments, e.g. range(1000)
+ */
+ override def visitTableValuedFunction(ctx: TableValuedFunctionContext)
+ : LogicalPlan = withOrigin(ctx) {
+ val expressions = ctx.expression.asScala.map { ec =>
+ val e = expression(ec)
+ assert(e.foldable, "All arguments of a table-valued-function must be
constants.", ec)
--- End diff --
Related to this pr, should this be checked in analysis time rather than
expression time? Otherwise you wouldn't be able to do 1 + 2.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]