flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5520) Disable outer joins with non-equality predicates
Date Wed, 18 Jan 2017 08:10:26 GMT

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

ASF GitHub Bot commented on FLINK-5520:

Github user fhueske commented on the issue:

    I agree with @lincoln-lil and @shaoxuan-wang, this fix should go into the `1.1-release`,
`1.2-release`, and `master` branches. We will later add support for non-equality predicate
on left/right outer joins to master and include it for 1.3.0.
    Regarding the check, I agree with @wuchong. We implement these checks in  `RelOptRule.matches()`
to prevent that an invalid plan is constructed. Otherwise it may happen that we end up with
an invalid plan although, there would be a valid (but more expensive) alternative. We have
additional checks in the DataSet operators to be on the safe side but these should never be
triggered. If this happens, something is wrong with the optimization phase. So its kind of
a safety net. Although, I don't think there are rules to generate alternative plans to execute
an outer join with non-equality predicate, I would like to keep the pattern for consistency
    Also the check in the validation phase of the Table API is useful, because the validation
happens immediately when a function on a `Table` is called. In contrast, the check on `DataSetJoin`
would happen when the translation is triggered, i.e., when the program is optimized and translated
into a DataSet program. Throwing an exception early is helpful for users because they can
much easier identify an invalid statement.

> Disable outer joins with non-equality predicates
> ------------------------------------------------
>                 Key: FLINK-5520
>                 URL: https://issues.apache.org/jira/browse/FLINK-5520
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.2.0
>            Reporter: Fabian Hueske
>            Assignee: lincoln.lee
>            Priority: Blocker
>             Fix For: 1.2.0
> Outer joins with non-equality predicates (and at least one equality predicate) compute
incorrect results. 
> Since this is not a very common requirement, I propose to disable this feature for the
1.2.0 release and correctly implement it for a later version.
> The fix should add checks in the Table API validation phase (to get a good error message)
and in the DataSetJoinRule to prevent translation of SQL queries with non-equality predicates
on outer joins.

This message was sent by Atlassian JIRA

View raw message