wuchong commented on a change in pull request #9236: [FLINK-13283][jdbc] Fix
JDBC connectors with DataTypes.DATE/TIME/TIMESTAMP support
URL: https://github.com/apache/flink/pull/9236#discussion_r308047537
##########
File path:
flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCInputFormatTest.java
##########
@@ -314,10 +315,40 @@ public void
testJDBCInputFormatWithParallelismAndGenericSplitting() throws IOExc
jdbcInputFormat.closeInputFormat();
}
+ @Test
+ public void testJDBCInputFormatWithParallelismAndTimestampSplitting()
throws IOException {
+ Serializable[][] queryParameters = new LocalDateTime[2][2];
+ queryParameters[0] = new
LocalDateTime[]{TEST_DATA[0].printTimestamp, TEST_DATA[4].printTimestamp};
+ queryParameters[1] = new
LocalDateTime[]{TEST_DATA[5].printTimestamp, TEST_DATA[9].printTimestamp};
+ ParameterValuesProvider paramProvider = new
GenericParameterValuesProvider(queryParameters);
+ jdbcInputFormat = JDBCInputFormat.buildJDBCInputFormat()
+ .setDrivername(DRIVER_CLASS)
+ .setDBUrl(DB_URL)
+
.setQuery(JDBCTestBase.SELECT_ALL_BOOKS_SPLIT_BY_TIMESTAMP)
+ .setRowTypeInfo(ROW_TYPE_INFO)
Review comment:
Could you add a test to verify java.sql.Date/Timestamp still work?
----------------------------------------------------------------
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