TsReaper 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_r302492140
 
 

 ##########
 File path: 
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCTableSource.java
 ##########
 @@ -74,12 +118,56 @@ public static Builder builder() {
                return new Builder();
        }
 
+       private JDBCInputFormat getInputFormat() {
+               JDBCInputFormat.JDBCInputFormatBuilder builder = 
JDBCInputFormat.buildJDBCInputFormat()
+                               .setDrivername(options.getDriverName())
+                               .setDBUrl(options.getDbURL())
+                               .setUsername(options.getUsername())
+                               .setPassword(options.getPassword())
+                               .setRowTypeInfo(new 
RowTypeInfo(schema.getFieldTypes(), schema.getFieldNames()));
+
+               String query = options.getDialect().getSelectFromStatement(
+                       options.getTableName(), returnType.getFieldNames(), new 
String[0]);
+               if (scanOptions != null) {
+                       long lowerBound = scanOptions.getPartitionLowerBound();
+                       long upperBound = scanOptions.getPartitionUpperBound();
+                       long numPartitions = scanOptions.getNumPartitions();
+                       // partitionSize = Math.ceil(upperBound - lowerBound + 
1) / numPartitions;
+                       // the following is equivalent
 
 Review comment:
   I change the interfaces of `NumericBetweenParametersProvider`. We do not 
need `Math.ceil` any more.

----------------------------------------------------------------
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

Reply via email to