[
https://issues.apache.org/jira/browse/BEAM-9953?focusedWorklogId=455129&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-455129
]
ASF GitHub Bot logged work on BEAM-9953:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Jul/20 22:48
Start Date: 06/Jul/20 22:48
Worklog Time Spent: 10m
Work Description: amaliujia commented on a change in pull request #12169:
URL: https://github.com/apache/beam/pull/12169#discussion_r450518142
##########
File path:
sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/TVFScanConverter.java
##########
@@ -42,45 +42,57 @@
@Override
public RelNode convert(ResolvedTVFScan zetaNode, List<RelNode> inputs) {
RelNode input = inputs.get(0);
+ RexCall call =
+ getExpressionConverter()
+ .convertTableValuedFunction(
+ input,
+ zetaNode.getTvf(),
+ zetaNode.getArgumentList(),
+ zetaNode.getArgumentList().get(0).getScan() != null
+ ?
zetaNode.getArgumentList().get(0).getScan().getColumnList()
+ : Collections.emptyList());
RelNode tableFunctionScan =
LogicalTableFunctionScan.create(
- getCluster(),
- inputs,
- getExpressionConverter()
- .convertTableValuedFunction(
- input,
- zetaNode.getTvf(),
- zetaNode.getArgumentList(),
-
zetaNode.getArgumentList().get(0).getScan().getColumnList()),
- null,
- createRowTypeWithWindowStartAndEnd(input.getRowType()),
- Collections.EMPTY_SET);
+ getCluster(), inputs, call, null, call.getType(),
Collections.EMPTY_SET);
+ // Pure SQL UDF's language body is built bottom up, so
FunctionArgumentRefMapping should be
+ // already consumed thus it can be cleared now.
+ context.clearFunctionArgumentRefMapping();
Review comment:
There are a lot more to test, including JOIN and AGGREGATE in UDTVF.
----------------------------------------------------------------
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: 455129)
Time Spent: 3h (was: 2h 50m)
> Beam ZetaSQL supports multiple statements in a query
> ----------------------------------------------------
>
> Key: BEAM-9953
> URL: https://issues.apache.org/jira/browse/BEAM-9953
> Project: Beam
> Issue Type: Task
> Components: dsl-sql-zetasql
> Reporter: Rui Wang
> Assignee: Kyle Weaver
> Priority: P2
> Time Spent: 3h
> Remaining Estimate: 0h
>
> One example of multiple statements query:
> {code:java}
> CREATE FUNCTION fun_a (param_1 INT64); SELECT fun_a(10);
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)