JingsongLi commented on a change in pull request #9029: [FLINK-13118][jdbc]
Introduce JDBC table factory and bridge JDBC table source with streaming table
source
URL: https://github.com/apache/flink/pull/9029#discussion_r301858466
##########
File path:
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/dialect/JDBCDialect.java
##########
@@ -125,7 +125,7 @@ default String getSelectFromStatement(String tableName,
String[] selectFields, S
String fieldExpressions = Arrays.stream(conditionFields)
.map(f -> quoteIdentifier(f) + "=?")
.collect(Collectors.joining(" AND "));
- return "SELECT " + selectExpressions + " FROM " +
- quoteIdentifier(tableName) + " WHERE " +
fieldExpressions;
+ return "SELECT " + (selectFields.length > 0 ? selectExpressions
: "*") + " FROM " +
Review comment:
I prefer a boolean `selectStar` instead of `(selectFields.length > 0 ?
selectExpressions : "*")`
----------------------------------------------------------------
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