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

   ### Prepare a Pull Request
   
   [INLONG-7708][Sort] Fix parse source failed when adding a table during all 
database migration in Oracle
   
   - Fixes #7708
   
   ### Motivation
   
   Fix parse source failed when adding a table during all database migration in 
Oracle.
   When adding a new table, the `schemaChangeRecordValue` method reads three 
values from the `source`: `BINLOG_FILENAME_OFFSET_KEY`, 
`BINLOG_POSITION_OFFSET_KEY` and `SERVER_ID_KEY`. However, these fields only 
exist in MySQL, so we need to check the type of the source.
   
   ### Modifications
   
   Check if the source is of type MySQL, and if it is, obtain the 
BINLOG-related information.
   
   ```java
               if (MYSQL.equals(connector)) {
                   String fileName = 
sourceInfo.getString(BINLOG_FILENAME_OFFSET_KEY);
                   Long pos = sourceInfo.getInt64(BINLOG_POSITION_OFFSET_KEY);
                   Long serverId = sourceInfo.getInt64(SERVER_ID_KEY);
                   source.put(SERVER_ID_KEY, serverId);
                   source.put(BINLOG_FILENAME_OFFSET_KEY, fileName);
                   source.put(BINLOG_POSITION_OFFSET_KEY, pos);
               
   ```


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

Reply via email to