1362227089 opened a new pull request, #12421:
URL: https://github.com/apache/seatunnel/pull/12421

   ### Purpose of this pull request
   
   Fix the `Duplicate key` exception when syncing with HighGo database.
   HighGo database may return multiple identical rows for one physical table in 
`information_schema.tables`. This causes `TableDiscoveryUtils.listTables()` to 
generate multiple identical `TableId`, then fails when constructing map with 
`Collectors.toMap()`.
   
   Add deduplication logic at table‑discovery boundary inside 
`TableDiscoveryUtils.listTables()`, deduplicate by full 
`TableId(catalog‑schema‑table)` before returning table collection.
   This fix only eliminates fully duplicate table entries, keep original 
behavior for standard PostgreSQL, no change for normal PostgreSQL discovery 
flow.
   
   ### Does this PR introduce *any* user‑facing change?
   
   No
   
   ### How was this patch tested?
   
   1. Added new unit test case: mock `information_schema.tables` returns 
multiple identical table rows, verify output list only keeps one unique TableId.
   2. Manual verification:
      - HighGo database scenario: reproduce original `Duplicate key` error, 
after fix, Postgres‑CDC source startup successfully.
      - Standard PostgreSQL scenario: existing table‑discovery logic unchanged, 
CDC task works as before.


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