You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "hailin0 (via GitHub)" <gi...@apache.org> on 2023/04/11 03:26:15 UTC

[GitHub] [incubator-seatunnel] hailin0 opened a new pull request, #4542: [Bug][CDC] Fix cdc shuffle data to ignore table-id case

hailin0 opened a new pull request, #4542:
URL: https://github.com/apache/incubator-seatunnel/pull/4542

   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/incubator-seatunnel/tree/dev/docs/en/connector-v2)
     2. Update [plugin-mapping.properties](https://github.com/apache/incubator-seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     3. Update the pom file of [seatunnel-dist](https://github.com/apache/incubator-seatunnel/blob/dev/seatunnel-dist/pom.xml)
   * [ ] Update the [`release-note`](https://github.com/apache/incubator-seatunnel/blob/dev/release-note.md).


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


[GitHub] [incubator-seatunnel] hailin0 merged pull request #4542: [Bug][CDC] Fix TemporalConversions

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 merged PR #4542:
URL: https://github.com/apache/incubator-seatunnel/pull/4542


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


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

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #4542:
URL: https://github.com/apache/incubator-seatunnel/pull/4542#discussion_r1162262721


##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/utils/TemporalConversions.java:
##########
@@ -66,6 +67,9 @@ public static LocalDate toLocalDate(Object obj) {
             return LocalDate.of(date.getYear() + 1900, date.getMonth() + 1, date.getDate());
         }
         if (obj instanceof Long) {
+            if ((Long)obj > ChronoField.EPOCH_DAY.range().getMaximum()) {

Review Comment:
   fix millisecond



##########
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:
   SeaTunnelRow#tableId using uppercase



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


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

Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on PR #4542:
URL: https://github.com/apache/incubator-seatunnel/pull/4542#issuecomment-1503572672

   <img width="1006" alt="image" src="https://user-images.githubusercontent.com/14371345/231207443-e79b4cdd-fad1-4fbb-a035-9487bd278cdc.png">
   


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


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

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
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