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(cdc): wrong output when mapping pg-numeric to varchar in postgres-cdc #16395

Open
KeXiangWang opened this issue Apr 19, 2024 · 3 comments
Open
Labels
type/bug Something isn't working

Comments

@KeXiangWang
Copy link
Contributor

Describe the bug

In #16346, we allow mapping numeric to varchar in postgres-cdc to avoid the precision loss of pg-numeric to rw-numeric in some scenarios. However the spacial value are converted to wrong string. To be specific:

value current output string expected output string
nan NAN NaN
inf POSITIVE_INFINITIY Infinity
-inf NEGATIVE_INFINITIY -Infinity

See more discussion here.

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@xiangjinwu
Copy link
Contributor

@StrikeW
Copy link
Contributor

StrikeW commented Apr 30, 2024

The default value of decimal.handling.mode is string in our config.

decimal.handling.mode=${debezium.decimal.handling.mode:-string}

Not sure whether our DebeziumJsonParser can handle the precise mode

precise represents values by using java.math.BigDecimal to represent values in binary form in change events.

@fuyufjh
Copy link
Member

fuyufjh commented Jul 10, 2024

Now we use POSITIVE_INFINITIY, expected Infinity

@fuyufjh fuyufjh removed this from the release-1.10 milestone Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants