wayneguow commented on code in PR #50073: URL: https://github.com/apache/spark/pull/50073#discussion_r1975385058
########## 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: Sorry for the late reply. After taking a look at the work about `Support SQL user-defined functions` led by Allison, I tried to explain: For the rule of SQL table functions, PR #49471 is in progress. I think we can also adding the `ResolveSQLTableFunctions` rule in `Analyzer` similarly, and throwing an exception if it is judged that `plan.containsPattern(SQL_TABLE_FUNCTION)` is true. The current content of the PR is based on quick fixes of existing code to optimize exception messages for the not fully implemented `SQLTableFunction`. If anyone agrees with the former solution, or has a better idea, I'd love to hear your suggestions. -- 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