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

sridhar Reddy commented on BEAM-7049:
-------------------------------------

Made a couple of simple cases work 

1)select 1 from order_details union select 2 from order_details union select 3 
from order_details

2)  select c2 from FirstOne union select c2 from FirstOne union select c2 from 
FirstOne

The implementation included manipulating and hardcoding of "inputs" in

[https://github.com/apache/beam/blob/946596b32c06419209ef157dcc742d6189b1c4f4/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamUnionRel.java#L75]

and changes to accept three inputs in the following

[https://github.com/apache/beam/blob/946596b32c06419209ef157dcc742d6189b1c4f4/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamSetOperatorRelBase.java#L61]

and

[https://github.com/apache/beam/blob/946596b32c06419209ef157dcc742d6189b1c4f4/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/transform/BeamSetOperatorsTransforms.java#L60]

 

Thank you for the additional information [~amaliujia] . I will be working on 
understanding it and also looking to improve on my implementation to accept 2 
as well as 3 inputs in the proper places.

 

 

> 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
>
> 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