wuchong commented on a change in pull request #11538: [FLINK-16813][jdbc]  
JDBCInputFormat doesn't correctly map Short
URL: https://github.com/apache/flink/pull/11538#discussion_r399015861
 
 

 ##########
 File path: 
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/dialect/JDBCDialects.java
 ##########
 @@ -403,5 +413,38 @@ public int minTimestampPrecision() {
                        );
 
                }
+
+               @Override
+               public void setRow(ResultSet resultSet, RowType rowType, Row 
reuse) throws SQLException {
+                       for (int pos = 0; pos < rowType.getFieldCount(); pos++) 
{
+                               LogicalType type = rowType.getTypeAt(pos);
+                               Object v = resultSet.getObject(pos + 1);
+
+                               if (type instanceof SmallIntType) {
+                                       reuse.setField(pos, ((Integer) 
v).shortValue());
+                               } else if (type instanceof ArrayType) {
 
 Review comment:
   IIUC, currently, only Postgres supports `ArrayType`?

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