ibzib commented on a change in pull request #12169:
URL: https://github.com/apache/beam/pull/12169#discussion_r450526186
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLPlannerImpl.java
##########
@@ -171,6 +178,18 @@ public RelRoot rel(String sql, QueryParameters params) {
SqlAnalyzer.USER_DEFINED_FUNCTIONS,
String.join(".", createFunctionStmt.getNamePath()));
udfBuilder.put(functionFullName, createFunctionStmt);
+ } else if (statement.nodeKind() == RESOLVED_CREATE_TABLE_FUNCTION_STMT) {
+ ResolvedCreateTableFunctionStmt createTableFunctionStmt =
+ (ResolvedCreateTableFunctionStmt) statement;
+ catalog.addTableValuedFunction(
Review comment:
https://github.com/apache/beam/blob/103facbf80c2e4786e60367161ec59352196d04a/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/SqlAnalyzer.java#L152
I suggest adding scalar functions and TVF to the catalog in the same file.
So either move `catalog.add(scalar function)` to ZetaSQLPlannerImpl or move
`catalog.add(TVF)` to SqlAnalyzer.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]