JNSimba commented on code in PR #451:
URL:
https://github.com/apache/doris-flink-connector/pull/451#discussion_r1694432784
##########
flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/db2/Db2Schema.java:
##########
@@ -41,4 +45,31 @@ public String convertToDorisType(String fieldType, Integer
precision, Integer sc
public String getCdcTableName() {
return schemaName + "\\." + tableName;
}
+
+ @Override
+ public LinkedHashMap<String, FieldSchema> getColumnInfo(
+ DatabaseMetaData metaData, String databaseName, String schemaName,
String tableName)
+ throws SQLException {
+ LinkedHashMap<String, FieldSchema> fields = new LinkedHashMap<>();
+ //
+ try (ResultSet rs = metaData.getColumns(null, schemaName, tableName,
null)) {
+ while (rs.next()) {
+ String fieldName = rs.getString("COLUMN_NAME");
+ String comment = rs.getString("REMARKS");
+ String fieldType = rs.getString("TYPE_NAME");
+ Integer precision = rs.getInt("COLUMN_SIZE");
Review Comment:
https://github.com/apache/doris-flink-connector/pull/443/files This pr has
some common variables. Can you use them directly?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]