cloud-fan commented on code in PR #50073:
URL: https://github.com/apache/spark/pull/50073#discussion_r1971581507


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/EliminateSQLFunctionNode.scala:
##########
@@ -34,8 +36,8 @@ object EliminateSQLFunctionNode extends Rule[LogicalPlan] {
     plan.transformWithSubqueries {
       case SQLFunctionNode(_, child) => child
       case f: SQLTableFunction =>
-        throw SparkException.internalError(
-          s"SQL table function plan should be rewritten during analysis: $f")
+        throw 
QueryCompilationErrors.tableValuedArgumentsNotYetImplementedForSqlFunctions(

Review Comment:
   Same question. How do we leak `SQLTableFunction` to the optimizer if we fail 
earlier in the analyzer/parser?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to