You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Wenkai Qi (Jira)" <ji...@apache.org> on 2024/11/18 10:30:00 UTC
[jira] [Created] (FLINK-36741) The precision of Decimal has been lost when use FlinkCDC transform
Wenkai Qi created FLINK-36741:
---------------------------------
Summary: The precision of Decimal has been lost when use FlinkCDC transform
Key: FLINK-36741
URL: https://issues.apache.org/jira/browse/FLINK-36741
Project: Flink
Issue Type: Bug
Components: Flink CDC
Affects Versions: cdc-3.2.0
Reporter: Wenkai Qi
The precision and scale of Decimal has been lost when use FlinkCDC transform to project express or alias.
The fields of this table are as follows:
||column name||data type||
|id|int|
|name|string|
|age|int|
|address|string|
|deposit|decimal(10,2)|
|weight|double|
|height|double|
The projection rule of this pipeline are as follows:
{code:java}
projection: id, upper(name) as name, age + 1 as newage, deposit as deposits, weight / (height * height) as bmi {code}
The parsed data types are as follows:
||column name||data type||
|id|int|
|name|string|
|newage|int|
|deposits|decimal(19,0)|
|bmi|double|
The expected data type of deposits should be decimal(10,2).
I have fixed it, and I will pull request.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)