[
https://issues.apache.org/jira/browse/BEAM-11747?focusedWorklogId=553349&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-553349
]
ASF GitHub Bot logged work on BEAM-11747:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 17/Feb/21 03:21
Start Date: 17/Feb/21 03:21
Worklog Time Spent: 10m
Work Description: apilloud commented on a change in pull request #13898:
URL: https://github.com/apache/beam/pull/13898#discussion_r577298008
##########
File path:
sdks/java/extensions/sql/zetasql/src/test/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSqlJavaUdfTest.java
##########
@@ -222,13 +224,18 @@ public void testBinaryJavaUdf() {
String sql =
String.format(
"CREATE FUNCTION matches(str STRING, regStr STRING) RETURNS
BOOLEAN LANGUAGE java OPTIONS (path='%s'); "
- + "SELECT matches(\"a\", \"a\"), 'apple'='beta'",
+ + "SELECT matches('a', 'a'), matches('apple', 'beta')",
Review comment:
I agree, this doesn't need to change for this PR so I reverted my
changes.
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLQueryPlanner.java
##########
@@ -129,20 +149,61 @@ static boolean hasOnlyJavaUdfInProjects(RelOptRuleCall x)
{
for (RexNode rexNode : logicalCalc.getProgram().getExprList()) {
if (rexNode instanceof RexCall) {
RexCall call = (RexCall) rexNode;
- if (call.getOperator() instanceof SqlUserDefinedFunction) {
+ final SqlOperator operator = call.getOperator();
+
+ CallImplementor implementor = RexImpTable.INSTANCE.get(operator);
+ if (implementor == null) {
+ // Reject methods with no implimentation
Review comment:
Done.
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/ZetaSQLQueryPlanner.java
##########
@@ -81,6 +89,13 @@
"nullness" // TODO(https://issues.apache.org/jira/browse/BEAM-10402)
})
public class ZetaSQLQueryPlanner implements QueryPlanner {
+ public enum Calc {
Review comment:
I like your suggestion for now, simpler is better.
----------------------------------------------------------------
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: 553349)
Time Spent: 4.5h (was: 4h 20m)
> Reject the mixed Java UDF and ZetaSQL builtin operators cases
> --------------------------------------------------------------
>
> Key: BEAM-11747
> URL: https://issues.apache.org/jira/browse/BEAM-11747
> Project: Beam
> Issue Type: Sub-task
> Components: dsl-sql-zetasql
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: P2
> Time Spent: 4.5h
> Remaining Estimate: 0h
>
> Before we have Calc splitting implemented, we can reject the mixed Java UDF
> and ZetaSQL builtin operators cases to maintain the correctness of a query.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)