Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1941#discussion_r62018227
--- Diff:
flink-batch-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormat.java
---
@@ -21,57 +21,103 @@
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.apache.flink.api.common.io.NonParallelInput;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.util.Arrays;
import org.apache.flink.api.common.io.DefaultInputSplitAssigner;
import org.apache.flink.api.common.io.RichInputFormat;
import org.apache.flink.api.common.io.statistics.BaseStatistics;
+import org.apache.flink.api.java.io.QueryParamInputSplit;
+import org.apache.flink.api.java.io.jdbc.split.JDBCInputSplitsGenerator;
import org.apache.flink.api.java.tuple.Tuple;
+import org.apache.flink.api.table.Row;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.core.io.GenericInputSplit;
import org.apache.flink.core.io.InputSplit;
import org.apache.flink.core.io.InputSplitAssigner;
-import org.apache.flink.types.NullValue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* InputFormat to read data from a database and generate tuples.
* The InputFormat has to be configured using the supplied
InputFormatBuilder.
*
+ * Remark: split (if set) works only if the split column is numeric
+ *
* @param <OUT>
* @see Tuple
* @see DriverManager
*/
-public class JDBCInputFormat<OUT extends Tuple> extends
RichInputFormat<OUT, InputSplit> implements NonParallelInput {
- private static final long serialVersionUID = 1L;
+public class JDBCInputFormat extends RichInputFormat<Row, InputSplit> {
--- End diff --
Can you update the JavaDocs of this class and its methods?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---