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

Shengkai Fang commented on FLINK-33490:
---------------------------------------

Hi, [~martijnvisser]. I think this issue is just a bug fix rather than feature 
and the scope of the fix is clear(in previous discussions, this fix is just 
about aligning with the SQL standard and the behavior of other databases). 
Introducing a FLIP to fix a bug would not only consume a lot of our time, but 
it would also make the whole fixing process very lengthy. 

I think [~libenchao] 's proposal is just to sort out the current behavior 
supported by Flink SQL, to make Flink SQL easier for users to understand and 
more in line with SQL standards. However, this does not affect our bug fix, 
because the purpose of this bug fix itself is to make Flink SQL more standard.

WDYT? cc [~lincoln.86xy] [~xuyangzhong] [~libenchao] 

 

> Validate the name conflicts when creating view
> ----------------------------------------------
>
>                 Key: FLINK-33490
>                 URL: https://issues.apache.org/jira/browse/FLINK-33490
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.19.0
>            Reporter: Shengkai Fang
>            Assignee: xuyang
>            Priority: Major
>              Labels: pull-request-available
>
> We should forbid 
> ```
> CREATE VIEW id_view AS
> SELECT id, uid AS id FROM id_table
> ```
> As the SQL standards states,
> If <regular view specification> is specified, then:
> i) If any two columns in the table specified by the <query expression> have 
> equivalent <column name>s, or if any column of that table has an 
> implementation-dependent name, then a <view column list> shall be specified.
> ii) Equivalent <column name>s shall not be specified more than once in the 
> <view column list>.
> Many databases also throw exception when view name conflicts, e.g. mysql, 
> postgres.



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

Reply via email to