wuchong commented on a change in pull request #10403: [FLINK-14645][table]
Support to keep nullability and precision when converting DataTypes to
properties
URL: https://github.com/apache/flink/pull/10403#discussion_r353720158
##########
File path:
flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/JDBCTableSourceSinkFactory.java
##########
@@ -136,6 +146,35 @@
return builder.build();
}
+ /**
+ * The original table schema may contain generated columns which
shouldn't be produced/consumed
+ * by TableSource/TableSink. And the original TIMESTAMP/DATE/TIME types
uses LocalDateTime/LocalDate/LocalTime
+ * as the conversion classes, however, JDBC connector uses
Timestamp/Date/Time classes. So that
+ * we bridge them to the expected conversion classes.
+ */
+ private TableSchema getPhysicalTableSchema(DescriptorProperties
descriptorProperties) {
Review comment:
I don't think it is a general util to be in `DescriptorProperties`. I think
it is more connector-specific behavior.
----------------------------------------------------------------
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