Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [CDCSOURCE] Oracle CDC could not deal with the date and number type properly #3478

Open
2 of 3 tasks
medivh511 opened this issue May 13, 2024 · 1 comment
Open
2 of 3 tasks
Assignees
Labels
Bug Something isn't working

Comments

@medivh511
Copy link

medivh511 commented May 13, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Flink 1.18.1 Dinky 1.02 Flink CDC 3.01

Oracle CDC could not transform the date and number type (especially for number(n) type), even u set the debezium.decimal.handling.mode to string

the exception looks like

number transform exception:

Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')

date transform exception:

Caused by: java.lang.ClassCastException: class java.lang.long cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')

What you expected to happen

The function initTypeConverterList in AbstractSinkBuilder did not work properly, not considered the oracle number and date type

How to reproduce

Create an oracle table which have date type and number(n) type's columns

run the script in dinky:

EXECUTE CDCSOURCE cdc_oracle WITH (
 'connector'='oracle-cdc',
 'hostname'='...',
 'port'='1521',
 'username'='...',
 'password'='...',
 'database-name'='...',
 'checkpoint'='3000',
 'scan.startup.mode'='initial',
 'parallelism'='1',
 'table-name'='....',
 'debezium.log.mining.strategy'='online_catalog',
 'debezium.database.history.store.only.captured.tables.ddl'='true',
 'debezium.database.tablename.case.insensitive'='false',
'debezium.log.mining.continuous.mine'='true',
 'debezium.decimal.handling.mode'='string',
 'sink.connector'='upsert-kafka',
 'sink.properties.bootstrap.servers'='....',
 'sink.topic'='#{tableName}',
 'sink.key.format'='json',
 'sink.value.format'='json'
)

Anything else

No response

Version

1.0.2

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@medivh511 medivh511 added Bug Something isn't working Waiting for reply Waiting for reply labels May 13, 2024
Copy link

Hello @medivh511, this issue is about CDC/CDCSOURCE, so I assign it to @aiwenmo. If you have any questions, you can comment and reply.

你好 @medivh511, 这个 issue 是关于 CDC/CDCSOURCE 的,所以我把它分配给了 @aiwenmo。如有任何问题,可以评论回复。

@aiwenmo aiwenmo removed the Waiting for reply Waiting for reply label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants