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

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

                Author: ASF GitHub Bot
            Created on: 01/Feb/21 19:36
            Start Date: 01/Feb/21 19:36
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on a change in pull request #13841:
URL: https://github.com/apache/beam/pull/13841#discussion_r568086566



##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLQueryPlanner.java
##########
@@ -104,6 +116,30 @@ public QueryPlanner createPlanner(
     return modifyRuleSetsForZetaSql(BeamRuleSets.getRuleSets());
   }
 
+  /** Returns true if the argument contains any user-defined Java functions. */
+  static boolean hasUdfInProjects(RelOptRuleCall x) {

Review comment:
       nit: I would probably stick this method in `BeamZetaSqlCalcRule`. What 
you have here are operators not supported by `ZetaSqlCalc`.

##########
File path: 
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/BeamJavaUdfCalcRule.java
##########
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.extensions.sql.zetasql;
+
+import org.apache.beam.sdk.extensions.sql.impl.rel.BeamCalcRel;
+import org.apache.beam.sdk.extensions.sql.impl.rel.BeamLogicalConvention;
+import 
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.Convention;
+import 
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.RelOptRule;
+import 
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.plan.RelOptRuleCall;
+import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.RelNode;
+import 
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.convert.ConverterRule;
+import org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.core.Calc;
+import 
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.logical.LogicalCalc;
+
+/** {@link ConverterRule} to replace {@link Calc} with {@link BeamCalcRel}. */
+public class BeamJavaUdfCalcRule extends ConverterRule {

Review comment:
       nit: You can drop the `convert` method if you extend `BeamCalcRule` 
instead...




----------------------------------------------------------------
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: 545543)
    Time Spent: 39h 10m  (was: 39h)

> 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: 39h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to