Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14656#discussion_r74852400
--- 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 --
not part of this pr -- @hvanhovell can we rename this assert? It is
actually not the normal assert that only fails when there is a bug in Spark.
This is used to catch user code.
---
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]