davidradl commented on code in PR #79:
URL:
https://github.com/apache/flink-connector-jdbc/pull/79#discussion_r1446523771
##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcRowDataLookupFunction.java:
##########
@@ -92,9 +103,22 @@ public JdbcRowDataLookupFunction(
})
.toArray(DataType[]::new);
this.maxRetryTimes = maxRetryTimes;
- this.query =
+
+ final String baseSelectStatement =
options.getDialect()
.getSelectFromStatement(options.getTableName(),
fieldNames, keyNames);
+ if (conditions == null || conditions.length == 0) {
+ this.query = baseSelectStatement;
+ if (LOG.isDebugEnabled()) {
Review Comment:
log4jLogger does check for debug, but other Logger implementations may not .
I see this method is used extensively in core Flink - I am included to leave it
in, it means the parameters are not formatted when debug is not on.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]