MaxGekk commented on code in PR #50073: URL: https://github.com/apache/spark/pull/50073#discussion_r1970338721
########## 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: Could you explain, please, why do we catch this in the optimizer, but not in the analyzer? -- 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