[
https://issues.apache.org/jira/browse/BEAM-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928996#comment-16928996
]
Rui Wang commented on BEAM-7049:
--------------------------------
I used query
"SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL
SELECT 5" to test and also enabled the rule.
I got the plan:
{code:java}
INFO: BEAMPlan>
BeamUnionRel(all=[true])
BeamCalcRel(expr#0=[{inputs}], expr#1=[1], EXPR$0=[$t1])
BeamValuesRel(tuples=[[{ 0 }]])
BeamCalcRel(expr#0=[{inputs}], expr#1=[2], EXPR$0=[$t1])
BeamValuesRel(tuples=[[{ 0 }]])
BeamCalcRel(expr#0=[{inputs}], expr#1=[3], EXPR$0=[$t1])
BeamValuesRel(tuples=[[{ 0 }]])
BeamCalcRel(expr#0=[{inputs}], expr#1=[4], EXPR$0=[$t1])
BeamValuesRel(tuples=[[{ 0 }]])
BeamCalcRel(expr#0=[{inputs}], expr#1=[5], EXPR$0=[$t1])
BeamValuesRel(tuples=[[{ 0 }]])
{code}
which is expected as BeamUnionRel has a list of inputs with 5 BeamCalcRel(and
each BeamCalcRel will be convert to a PCollection of Row)
> Merge multiple input to one BeamUnionRel
> ----------------------------------------
>
> Key: BEAM-7049
> URL: https://issues.apache.org/jira/browse/BEAM-7049
> Project: Beam
> Issue Type: Improvement
> Components: dsl-sql
> Reporter: Rui Wang
> Assignee: sridhar Reddy
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> BeamUnionRel assumes inputs are two and rejects more. So `a UNION b UNION c`
> will have to be created as UNION(a, UNION(b, c)) and have two shuffles. If
> BeamUnionRel can handle multiple shuffles, we will have only one shuffle
--
This message was sent by Atlassian Jira
(v8.3.2#803003)