apache / doris-flink-connector

Flink Connector for Apache Doris
https://doris.apache.org/
Apache License 2.0
292 stars 201 forks source link

[fix](cdc)fix mongodb sync cause ClassCastException when user specifies the `_id` field manually #410

Closed qg-lin closed 6 days ago

qg-lin commented 1 week ago

Proposed changes

Issue Number: close #xxx

Problem Summary:

When user specifies the _id field manually by Long type or other basic types, and forced cast it to Map type by code ((Map<?, ?>) rowMap.get(ID_FIELD)) would ClassCastException.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

qg-lin commented 1 week ago

@JNSimba PTAL