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

vinoyang commented on FLINK-10420:
----------------------------------

Since I have implemented showCreateView before, I found that if we don't 
consider the merged environment, then we will think that the view configured 
through YAML does not exist, but in fact it exists.

So, if we consider the merged environment, wouldn't we have some 
misunderstanding when we silently overwrite the view? Is it possible to specify 
an override with a "-f" option, or give a warning when it is created? Under 
normal circumstances, the creation chooses to report an error? Because it is 
very likely that views created through configuration have been used, this can 
lead to problems that are difficult to locate.

What do you think?

> Create and drop view in sql client should check the view created based on the 
> configuration.
> --------------------------------------------------------------------------------------------
>
>                 Key: FLINK-10420
>                 URL: https://issues.apache.org/jira/browse/FLINK-10420
>             Project: Flink
>          Issue Type: Bug
>          Components: SQL Client
>            Reporter: vinoyang
>            Assignee: vinoyang
>            Priority: Minor
>
> Currently, just checked current session : 
> {code:java}
> private void callCreateView(SqlCommandCall cmdCall) {
>    final String name = cmdCall.operands[0];
>    final String query = cmdCall.operands[1];
>    //here
>    final String previousQuery = context.getViews().get(name);
>    if (previousQuery != null) {
>       printExecutionError(CliStrings.MESSAGE_VIEW_ALREADY_EXISTS);
>       return;
>    }
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to