[ 
https://issues.apache.org/jira/browse/BEAM-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902556#comment-16902556
 ] 

Rui Wang edited comment on BEAM-7049 at 8/8/19 12:26 AM:
---------------------------------------------------------

I see. Can you confirm how many instances of 
[BeamUnionRel|https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamUnionRel.java]
  created for your UNION query in your test?

You can set a breakpoint at: 
[CalciteQueryPlanner.java#L167|https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/CalciteQueryPlanner.java#L167]
 to observe generated physical plan (check the structure of beamRelNode). 


was (Author: amaliujia):
I see. Can you confirm how many instances of [BeamUnionRel 
title|https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamUnionRel.java]
  created for your UNION query in your test?

You can set a breakpoint at: 
[CalciteQueryPlanner.java#L167|https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/CalciteQueryPlanner.java#L167]
 to observe generated physical plan (check the structure of beamRelNode). 

> BeamUnionRel should work on mutiple input 
> ------------------------------------------
>
>                 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
>
> 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
(v7.6.14#76016)

Reply via email to