[ 
https://issues.apache.org/jira/browse/BEAM-10943?focusedWorklogId=573735&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-573735
 ]

ASF GitHub Bot logged work on BEAM-10943:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 29/Mar/21 21:24
            Start Date: 29/Mar/21 21:24
    Worklog Time Spent: 10m 
      Work Description: ibzib commented on a change in pull request #14263:
URL: https://github.com/apache/beam/pull/14263#discussion_r603623438



##########
File path: 
sdks/java/extensions/sql/zetasql/src/test/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSqlJavaUdfTest.java
##########
@@ -186,6 +188,25 @@ public void testExpectedNullArgument() {
     
pipeline.run().waitUntilFinish(Duration.standardMinutes(PIPELINE_EXECUTION_WAITTIME_MINUTES));
   }
 
+  public static class IncrementFn implements BeamSqlUdf {
+    public Long eval(Long i) {
+      return i + 1;
+    }
+  }
+
+  @Test
+  public void testSqlTransformRegisterUdf() {
+    String sql = "SELECT increment(0);";
+    PCollection<Row> stream =
+        pipeline.apply(
+            SqlTransform.query(sql)
+                .withQueryPlannerClass(ZetaSQLQueryPlanner.class)

Review comment:
       Note to self: this test doesn't work because ZetaSQLQueryPlanner does 
not have BeamJavaUdfCalcRule enabled by default, and we can't pass a 
ZetaSQLQueryPlanner instance to SqlTransform (only the class itself).




-- 
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: 573735)
    Time Spent: 1h 20m  (was: 1h 10m)

> 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: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to