[
https://issues.apache.org/jira/browse/FLINK-22427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Flink Jira Bot updated FLINK-22427:
-----------------------------------
Labels: stale-major (was: )
I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help
the community manage its development. I see this issues has been marked as
Major but is unassigned and neither itself nor its Sub-Tasks have been updated
for 30 days. I have gone ahead and added a "stale-major" to the issue". If this
ticket is a Major, please either assign yourself or give an update. Afterwards,
please remove the label or in 7 days the issue will be deprioritized.
> 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: Major
> Labels: stale-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)