libenchao commented on code in PR #79:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/79#discussion_r1457562374


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/statement/FieldNamedPreparedStatementImpl.java:
##########
@@ -178,26 +178,42 @@ public void close() throws SQLException {
     // 
----------------------------------------------------------------------------------------
 
     public static FieldNamedPreparedStatement prepareStatement(
-            Connection connection, String sql, String[] fieldNames) throws 
SQLException {
+            Connection connection,
+            String sql,
+            String[] fieldNames,
+            String additionalPredicates,
+            int numberOfDynamicParams)
+            throws SQLException {
         checkNotNull(connection, "connection must not be null.");
         checkNotNull(sql, "sql must not be null.");
         checkNotNull(fieldNames, "fieldNames must not be null.");
 
-        if (sql.contains("?")) {

Review Comment:
   Do we need to remove this check?



##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcRowDataLookupFunction.java:
##########
@@ -63,6 +64,9 @@ public class JdbcRowDataLookupFunction extends LookupFunction 
{
     private final JdbcRowConverter jdbcRowConverter;
     private final JdbcRowConverter lookupKeyRowConverter;
 
+    private List<String> resolvedPredicates = new ArrayList<>();
+    private Serializable[] pushdownParams = new Serializable[0];

Review Comment:
   These two variable could be `final`.



##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/statement/FieldNamedPreparedStatementImplTest.java:
##########
@@ -41,6 +41,10 @@ class FieldNamedPreparedStatementImplTest {
     private final String[] keyFields = new String[] {"id", "__field_3__"};
     private final String tableName = "tbl";
 
+    private final String[] fieldNames2 =
+            new String[] {"id:", "name", "email", "ts", "field1", "field_2", 
"__field_3__"};
+    private final String[] keyFields2 = new String[] {"id?:", "__field_3__"};
+

Review Comment:
   This is change is not necessary anymore?



##########
flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/table/JdbcTablePlanTest.java:
##########
@@ -70,6 +98,51 @@ public void testFilterPushdown() {
                 "SELECT id, time_col, real_col FROM jdbc WHERE id = 900001 AND 
time_col <> TIME '11:11:11' OR double_col >= -1000.23");
     }
 
+    /**
+     * Note the join condition is not present in the optimized plan, as it is 
handled in the JDBC

Review Comment:
   Can you log another Jira to improve this, scan source has this ability 
already.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to