amaliujia commented on a change in pull request #13891:
URL: https://github.com/apache/beam/pull/13891#discussion_r569826561
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLPlannerImpl.java
##########
@@ -104,14 +106,30 @@ public RelRoot rel(String sql, QueryParameters params) {
ImmutableMap.Builder<List<String>, ResolvedCreateFunctionStmt> udfBuilder =
ImmutableMap.builder();
ImmutableMap.Builder<List<String>, ResolvedNode> udtvfBuilder =
ImmutableMap.builder();
+ ImmutableMap.Builder<List<String>,
UserFunctionDefinitions.JavaScalarFunction>
+ javaScalarFunctionBuilder = ImmutableMap.builder();
+ JavaUdfLoader javaUdfLoader = new JavaUdfLoader();
ResolvedStatement statement;
ParseResumeLocation parseResumeLocation = new ParseResumeLocation(sql);
do {
statement = analyzer.analyzeNextStatement(parseResumeLocation, options,
catalog);
if (statement.nodeKind() == RESOLVED_CREATE_FUNCTION_STMT) {
ResolvedCreateFunctionStmt createFunctionStmt =
(ResolvedCreateFunctionStmt) statement;
- udfBuilder.put(createFunctionStmt.getNamePath(), createFunctionStmt);
+ String functionGroup =
SqlAnalyzer.getFunctionGroup(createFunctionStmt);
+ if (SqlAnalyzer.USER_DEFINED_FUNCTIONS.equals(functionGroup)) {
Review comment:
Can you remind me that whether `USER_DEFINED_FUNCTIONS` here refers to
SQL-native UDF? If so can you update ` USER_DEFINED_FUNCTIONS` to
`USER_DEFINED_SQL_FUNCTIONS`?
----------------------------------------------------------------
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]