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_r311844392
##########
File path:
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/dialect/JDBCDialect.java
##########
@@ -115,6 +115,20 @@ default String getDeleteStatement(String tableName,
String[] conditionFields) {
return "DELETE FROM " + quoteIdentifier(tableName) + " WHERE "
+ conditionClause;
}
+ /**
+ * Get select fields statement by `is not distinct from` condition
fields. Default use SELECT.
+ */
+ default String getSelectNotDistinctFromStatement(String tableName,
String[] selectFields, String[] conditionFields) {
Review comment:
I would re-design the method names a bit.
- Add a new method `getSelectStatement(String tableName, String[]
selectFields)` which doesn't contain `WHERE` clause.
- Rename `getSelectFromStatement` to `getFilterStatement(String tableName,
String[] selectFields, String[] conditionFields)` and forces `conditionFields`
shouldn't be empty.
- Rename `getSelectNotDistinctFromStatement` to
`getNullSafeFilterStatement(...)`, because the default implementation is not
`is not distinct from` but is a null safe comparison different from
`getFilterStatement`. We should also outline this in the method javadoc.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services