You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Fabian Hueske (JIRA)" <ji...@apache.org> on 2016/12/19 17:21:58 UTC
[jira] [Comment Edited] (FLINK-5256) Extend DataSetSingleRowJoin to
support Left and Right joins
[ https://issues.apache.org/jira/browse/FLINK-5256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761740#comment-15761740 ]
Fabian Hueske edited comment on FLINK-5256 at 12/19/16 5:21 PM:
----------------------------------------------------------------
Sure, the plan I got was the logical plan before optimization (hence the logical operator and not the DataSet operators).
It seems that the change of FLINK-5255 was sufficient to execute the query that I posted before. The optimizer seems to have converted the left join into a regular inner join.
The goal of this issue is to support outer joins with {{DataSetSingleRowJoin}} in order to execute a query like the following:
{code}
SELECT b
FROM t1
LEFT JOIN
(SELECT COUNT(*) AS cnt FROM t2) AS x
ON a < cnt
{code}
So we need an outer join with a non-equality predicate and one input being a global aggregation (single row input). The outer (preserving) side should be non-single row input.
was (Author: fhueske):
Sure, the plan I got was the logical plan before optimization (hence the logical operator and not the DataSet operators).
It seems that the change of FLINK-5255 was sufficient to execute the query that I posted before. The optimizer seems to have converted the left join into a regular inner join.
The goal of this issue is to support outer joins with {{DataSetSingleRowJoin}} in order to execute a query like the following:
{code}
SELECT b
FROM t1
LEFT JOIN
(SELECT COUNT(*) AS cnt FROM t2) AS x
ON a < cnt
{code}
So we need an outer join with a non-equality predicate and one input being a global aggregation (single row 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
>
> 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)