TsReaper commented on a change in pull request #9236: 
[FLINK-13283][FLINK-13490][jdbc] Fix JDBC connectors with 
DataTypes.DATE/TIME/TIMESTAMP support and null checking
URL: https://github.com/apache/flink/pull/9236#discussion_r308708602
 
 

 ##########
 File path: 
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCUpsertOutputFormat.java
 ##########
 @@ -286,6 +286,7 @@ public Builder setMaxRetryTimes(int maxRetryTimes) {
                public JDBCUpsertOutputFormat build() {
                        checkNotNull(options, "No options supplied.");
                        checkNotNull(fieldNames, "No fieldNames supplied.");
+                       checkNotNull(fieldTypes, "No fieldTypes supplied.");
 
 Review comment:
   As @wuchong mentioned, it is error-prone if we don't set field types. If 
field types are not set, the `upload.setObject` in `setRecordToStatement` will 
try to directly set a `java.time.LocalDate` into a `DATE` type field.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to