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

Fabian Hueske commented on FLINK-5256:
--------------------------------------

I see, there are a few spots that need to be changed:

1) The generated join function: I saw you did something there already. For 
outer joins you need to evaluate the condition as well, but you need an else 
case that returns the tuple with the outer and null fields. We might need to 
generate a code for that.

2) the {{MapJoinLeftRunner}} and {{MapJoinRightRunner}}: Right now both runners 
do only call the join function if the single input is set (not null). For outer 
joins we also need to produce output if the single input is null. There are two 
ways to do that: 1) extend the code generated join function to handle null 
records. 2) generate a second function that just copies the fields of the outer 
record and adds null values for all others. The second approach would be more 
lightweight because we do not need to evaluate a join condition which will 
always be false due to the empty input.

> Extend DataSetSingleRowJoin to support Left and Right joins
> -----------------------------------------------------------
>
>                 Key: FLINK-5256
>                 URL: https://issues.apache.org/jira/browse/FLINK-5256
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.2.0
>            Reporter: Fabian Hueske
>            Assignee: Anton Mushin
>
> The {{DataSetSingleRowJoin}} is a broadcast-map join that supports arbitrary 
> inner joins where one input is a single row.
> I found that Calcite translates certain subqueries into non-equi left and 
> right joins with single input. These cases can be handled if the  
> {{DataSetSingleRowJoin}} is extended to support outer joins on the 
> non-single-row input, i.e., left joins if the right side is single input and 
> vice versa.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to