[ https://issues.apache.org/jira/browse/FLINK-20851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297187#comment-17297187 ]
jibiyr commented on FLINK-20851: -------------------------------- [~jark] hi wu,I reproduce the problem, when we use sql client, flink will generate *CollectStreamTableSink*, and create *CollectStreamTableSink* use query-schema However,ride when validate the sinkSchema, *CollectStreamTableSink* use default method to generate the table schema,so the precision of Decimal lost, and codegen cost null value. should we override the *getTableSchema* in *CollectStreamTableSink ,*and use tableSchema first if exists ? thanks > flink datagen produce NULL value > -------------------------------- > > Key: FLINK-20851 > URL: https://issues.apache.org/jira/browse/FLINK-20851 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.12.0 > Environment: > Reporter: appleyuchi > Priority: Major > Fix For: 1.13.0 > > Attachments: datagen報錯.png > > > ```` > CREATE TABLE orders ( > order_uid BIGINT, > product_id BIGINT, > price DECIMAL(32, 2), > order_time TIMESTAMP(3) > ) WITH ( > 'connector' = 'datagen' > ); > SELECT * FROM orders; > ```` > This DDL will produce NULL for column price. > but it's ok in > https://github.com/knaufk/flink-sql-cookbook/blob/master/recipes/01/01_create_table.md > ①If it's the flink-sql-cookbook's fault,tell me please, > Could you please tell me the right syntax for it? > ②If it's the flink's bug,fix it please. > Thanks for your help. -- This message was sent by Atlassian Jira (v8.3.4#803005)