You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Hisoka-X (via GitHub)" <gi...@apache.org> on 2023/04/12 02:34:00 UTC

[GitHub] [incubator-seatunnel] Hisoka-X commented on a diff in pull request #4542: [Bug][CDC] Fix cdc shuffle data to ignore table-id case

Hisoka-X commented on code in PR #4542:
URL: https://github.com/apache/incubator-seatunnel/pull/4542#discussion_r1163510365


##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeMapper.java:
##########
@@ -68,15 +68,20 @@ public class OracleTypeMapper implements JdbcDialectTypeMapper {
     private static final String ORACLE_RAW = "RAW";
     private static final String ORACLE_LONG_RAW = "LONG RAW";
 
-    @SuppressWarnings("checkstyle:MagicNumber")
     @Override
     public SeaTunnelDataType<?> mapping(ResultSetMetaData metadata, int colIndex)
             throws SQLException {
-        String oracleType = metadata.getColumnTypeName(colIndex).toUpperCase();
-        String columnName = metadata.getColumnName(colIndex);
-        int precision = metadata.getPrecision(colIndex);
-        int scale = metadata.getScale(colIndex);
-        switch (oracleType) {
+        return mapping(
+                metadata.getColumnName(colIndex),

Review Comment:
   Why remove `toUpperCase`?



##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializeSchema.java:
##########
@@ -128,7 +128,7 @@ public void deserialize(SourceRecord record, Collector<SeaTunnelRow> collector)
         } catch (Throwable e) {
             // ignore
         }
-        String tableId = TablePath.of(databaseName, schemaName, tableName).toString();
+        String tableId = TablePath.of(databaseName, schemaName, tableName).toString().toUpperCase();

Review Comment:
   If tableName case sensitive, there are a little problem.



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org