[ https://issues.apache.org/jira/browse/FLINK-22427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Flink Jira Bot updated FLINK-22427: ----------------------------------- Labels: auto-deprioritized-major (was: stale-major) Priority: Minor (was: Major) This issue was labeled "stale-major" 7 ago and has not received any updates so it is being deprioritized. If this ticket is actually Major, please raise the priority and ask a committer to assign you the issue or revive the public discussion. > Support DEFAULT value syntax to simplify data clean process > ----------------------------------------------------------- > > Key: FLINK-22427 > URL: https://issues.apache.org/jira/browse/FLINK-22427 > Project: Flink > Issue Type: New Feature > Components: Table SQL / API > Environment: Flink version 1.11.1 > Reporter: Moses > Priority: Minor > Labels: auto-deprioritized-major > > The SQL statement is designed as below: > {code:sql} > CREATE TABLE user_behavior ( > user_id BIGINT, > item_id BIGINT, > category_id BIGINT, > behavior STRING default 'soo', ---- Here I wanna use default value > ) WITH ( > 'connector' = 'kafka', > 'topic' = 'user_behavior', > 'scan.startup.mode' = 'earliest-offset', > 'properties.bootstrap.servers' = 'kafka:9094' > 'format' = 'json' > ); > {code} > Throws Exception: > {code:java} > [ERROR] Could not execute SQL statement. Reason: > org.apache.flink.sql.parser.impl.ParseException: Encountered "default" > at line 5, column 21. > Was expecting one of: > "CONSTRAINT" ... > {code} > It's more friendly for us to support that allowing users to set default > value during table schema definition. That will reduce UDXF usage and > simplify data clean process to some extent. > There are two points need to be solved: > * Support SQL grammar. > * Set field to specified value while field value is missing. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)