You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "e-mhui (via GitHub)" <gi...@apache.org> on 2023/03/10 07:54:11 UTC

[GitHub] [inlong] e-mhui opened a new pull request, #7561: [INLONG-7559][Sort] Fix Oracle CDC reads timestamp type record error

e-mhui opened a new pull request, #7561:
URL: https://github.com/apache/inlong/pull/7561

   ### Prepare a Pull Request
   
   Fix Oracle CDC reads timestamp type record error
   
   - Fixes #7559 
   
   ### Motivation
   
   Oracle CDC reads timestamp type record error. Because Oracle CDC has been shaded, the schema will have the prefix 'org.apache.inlong.sort.cdc.oracle.shaded' added, so we need to use `schemaName.contains()` to determine the Schema type.
   
   <img width="1247" alt="52273cb-2691-452b-8b55-66f82c0a33fd" src="https://user-images.githubusercontent.com/111486498/224255963-ad9bbc0c-d8d7-49a6-b9f0-54b862dc7927.png">
   
   
   ### Modifications
   
    Use `schemaName.contains()` to determine the Schema type.
   
   ```java
                       String schemaName = schema.name();
                       if (schemaName.contains(Timestamp.SCHEMA_NAME)) {
                           return TimestampData.fromEpochMillis((Long) dbzObj);
                       } else if (schemaName.contains(MicroTimestamp.SCHEMA_NAME)) {
                           long micro = (long) dbzObj;
                           return TimestampData.fromEpochMillis(
                                   micro / 1000, (int) (micro % 1000 * 1000));
                       } else if (schemaName.contains(NanoTimestamp.SCHEMA_NAME)) {
                           long nano = (long) dbzObj;
                           return TimestampData.fromEpochMillis(
                                   nano / 1000_000, (int) (nano % 1000_000));
                       }
   ```


-- 
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@inlong.apache.org

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


[GitHub] [inlong] e-mhui commented on pull request #7561: [INLONG-7559][Sort] Fix Oracle CDC reads timestamp type record error

Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on PR #7561:
URL: https://github.com/apache/inlong/pull/7561#issuecomment-1464887481

   > @e-mhui Please update `Motivation` of description. Beacause you change to use `endsWith`.
   
   Done.


-- 
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@inlong.apache.org

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


[GitHub] [inlong] e-mhui commented on pull request #7561: [INLONG-7559][Sort] Fix Oracle CDC reads timestamp type record error

Posted by "e-mhui (via GitHub)" <gi...@apache.org>.
e-mhui commented on PR #7561:
URL: https://github.com/apache/inlong/pull/7561#issuecomment-1464887376

   > 
   
   Done.


-- 
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@inlong.apache.org

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


[GitHub] [inlong] gong commented on pull request #7561: [INLONG-7559][Sort] Fix Oracle CDC reads timestamp type record error

Posted by "gong (via GitHub)" <gi...@apache.org>.
gong commented on PR #7561:
URL: https://github.com/apache/inlong/pull/7561#issuecomment-1464809290

   @e-mhui Please update `Motivation` of description. Beacause you change to use `endWith`.


-- 
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@inlong.apache.org

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


[GitHub] [inlong] yunqingmoswu merged pull request #7561: [INLONG-7559][Sort] Fix Oracle CDC reads timestamp type record error

Posted by "yunqingmoswu (via GitHub)" <gi...@apache.org>.
yunqingmoswu merged PR #7561:
URL: https://github.com/apache/inlong/pull/7561


-- 
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@inlong.apache.org

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