wuchong commented on a change in pull request #9335: [FLINK-13503][API] Add contract in `LookupableTableSource` to specify the behavior when lookupKeys contains null. URL: https://github.com/apache/flink/pull/9335#discussion_r311845349
########## File path: flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCLookupFunction.java ########## @@ -101,7 +113,8 @@ public JDBCLookupFunction( this.maxRetryTimes = lookupOptions.getMaxRetryTimes(); this.keySqlTypes = Arrays.stream(keyTypes).mapToInt(JDBCTypeUtil::typeInformationToSqlType).toArray(); this.outputSqlTypes = Arrays.stream(fieldTypes).mapToInt(JDBCTypeUtil::typeInformationToSqlType).toArray(); - this.query = options.getDialect().getSelectFromStatement( + this.nonNullableQuery = options.getDialect().getSelectFromStatement(options.getTableName(), fieldNames, keyNames); + this.nullableQuery = options.getDialect().getSelectNotDistinctFromStatement( Review comment: If we have a consensus on the new methods of `SqlDialect`. we can call the field `nullSafeQuery` and `nonNullableQuery` -> `nullUnsafeQuery`. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services