[
https://issues.apache.org/jira/browse/BEAM-10943?focusedWorklogId=574318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-574318
]
ASF GitHub Bot logged work on BEAM-10943:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 30/Mar/21 18:39
Start Date: 30/Mar/21 18:39
Worklog Time Spent: 10m
Work Description: ibzib commented on a change in pull request #14263:
URL: https://github.com/apache/beam/pull/14263#discussion_r604343897
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/BeamZetaSqlCatalog.java
##########
@@ -276,6 +285,49 @@ private void addWindowTvfs() {
null));
}
+ private void addUdfsFromSchema() {
+ for (String functionName : calciteSchema.getFunctionNames()) {
+
Collection<org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function>
+ functions = calciteSchema.getFunctions(functionName);
+ if (functions.size() != 1) {
+ throw new IllegalArgumentException(
+ String.format(
+ "Expected exactly 1 definition for function '%s', but found
%d.",
+ functionName, functions.size()));
+ }
+ for
(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.schema.Function
function :
+ functions) {
+ if (function instanceof ScalarFunctionImpl) {
Review comment:
There are no other possible cases I'm aware of. I'll add that.
--
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: 574318)
Time Spent: 2h (was: 1h 50m)
> Support SqlTransform.registerUdf in ZetaSQL dialect
> ---------------------------------------------------
>
> Key: BEAM-10943
> URL: https://issues.apache.org/jira/browse/BEAM-10943
> Project: Beam
> Issue Type: Sub-task
> Components: dsl-sql-zetasql
> Reporter: Kyle Weaver
> Assignee: Kyle Weaver
> Priority: P2
> Time Spent: 2h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)