[
https://issues.apache.org/jira/browse/BEAM-10925?focusedWorklogId=547341&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-547341
]
ASF GitHub Bot logged work on BEAM-10925:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Feb/21 23:42
Start Date: 03/Feb/21 23:42
Worklog Time Spent: 10m
Work Description: 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 547341)
Time Spent: 40h 10m (was: 40h)
> ZetaSQL: Support Java UDF
> -------------------------
>
> Key: BEAM-10925
> URL: https://issues.apache.org/jira/browse/BEAM-10925
> Project: Beam
> Issue Type: New Feature
> Components: dsl-sql-zetasql
> Reporter: Kyle Weaver
> Assignee: Kyle Weaver
> Priority: P2
> Time Spent: 40h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)