You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Martijn Visser (Jira)" <ji...@apache.org> on 2022/09/21 08:07:00 UTC

[jira] [Commented] (FLINK-29373) DataStream to table not support BigDecimalTypeInfo

    [ https://issues.apache.org/jira/browse/FLINK-29373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17607592#comment-17607592 ] 

Martijn Visser commented on FLINK-29373:
----------------------------------------

Can't that be resolved with the annotation as documented at https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/types/#unregistered-structured-types ? 

> DataStream to table not support BigDecimalTypeInfo
> --------------------------------------------------
>
>                 Key: FLINK-29373
>                 URL: https://issues.apache.org/jira/browse/FLINK-29373
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.17.0
>            Reporter: hk__lrzy
>            Priority: Major
>         Attachments: image-2022-09-21-15-12-11-082.png
>
>
> When we want to transfrom datastream to table, `TypeInfoDataTypeConverter` will try to convert `TypeInformation` to `DataType`. But if datastream's produce types contains `BigDecimalTypeInfo`, `TypeInfoDataTypeConverter` will convert it `RawDataType`.
> Then when we want tranfrom table to datastream again, exception will hapend.
> !image-2022-09-21-15-12-11-082.png!
>  
> ```
> Caused by: org.apache.flink.table.codegen.CodeGenException: Incompatible types of expression and result type. Expression[GeneratedExpression(result$10,isNull$11,,Decimal(9,2),false)] type is [Decimal(9,2)], result type is [GenericType<java.math.BigDecimal>]
> ```



--
This message was sent by Atlassian Jira
(v8.20.10#820010)