[ https://issues.apache.org/jira/browse/FLINK-13503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16897004#comment-16897004 ]
Jing Zhang edited comment on FLINK-13503 at 7/31/19 10:11 AM: -------------------------------------------------------------- After discuss with [~jark] [~lzljs3620320] [~lic], we got the following conclusion: 1. LookupJoin does not support JoinCondition like 'L.a is not distinct from R.a' and other similar ( 'L.a = R.a or (L.a is null And R.a is null)'), which leads to filterNulls contains false in 1.9 version. Would be fixed in 1.10 version (https://issues.apache.org/jira/browse/FLINK-13509). 2. Add contract in `LookupableTableSource` to specify the behavior when lookupKeys contains null, it behaviors like point 2 in the jira content 3. Update `JdbcLookUpFunction` based on ad.2. Correct me if the conclusion is wrong. was (Author: jinyu.zj): After discuss with [~jark] [~lzljs3620320] [~lic], we got the following conclusion: 1. LookupJoin does not support JoinCondition like 'L.a is not distinct from R.a' and other similar ( 'L.a = R.a or (L.a is null And R.a is null)'), which leads to filterNulls contains false in 1.9 version. Would be fixed in 1.10 version. 2. Add contract in `LookupableTableSource` to specify the behavior when lookupKeys contains null, it behaviors like point 2 in the jira content 3. Update `JdbcLookUpFunction` based on ad.2. Correct me if the conclusion is wrong. > Add contract in `LookupableTableSource` to specify the behavior when > lookupKeys contains null > --------------------------------------------------------------------------------------------- > > Key: FLINK-13503 > URL: https://issues.apache.org/jira/browse/FLINK-13503 > Project: Flink > Issue Type: Task > Components: Connectors / JDBC, Table SQL / API > Affects Versions: 1.9.0, 1.10 > Reporter: Jing Zhang > Assignee: Jing Zhang > Priority: Minor > > I think we should add contract in `LookupableTableSource` to specify expected > behavior when the lookupKeys contains null value. > For example, one input record of eval method is (null,1) which means to look > up data in (a,b) columns which key satisfy the requirement. there are at > least three possibility here. > * to ignore null value, that is, in the above example, only looks `b = 1` > * to lookup `is value`, that is, in the above example, only looks `a is > null and b = 1` > * to return empty records, that is, in the above example, only looks `a = > null and b = 1` > In fact, there are different behavior in current code. > For example, in Jdbc connector, > The query template in `JdbcLookUpFunction` like: > SELECT c, d, e, f from T where a = ? and b = ? > If pass (null, 1) to `eval` method, it will generate the following query: > SELECT c, d, e, f from T where a = null and b = 1 > Which always outputs empty records. > BTW, Is this behavior reasonable? > and the `InMemoryLookupableTableSource` behaviors like point 2 in the above > list. > some private connector in Blink behaviors like point 1 -- This message was sent by Atlassian JIRA (v7.6.14#76016)