[ 
https://issues.apache.org/jira/browse/FLINK-14858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dawid Wysakowicz updated FLINK-14858:
-------------------------------------
    Summary: Wrong "if" statement in SqlToOperationConverter  (was: Coding 
error,this should be "else if" not the "if".)

> Wrong "if" statement in SqlToOperationConverter
> -----------------------------------------------
>
>                 Key: FLINK-14858
>                 URL: https://issues.apache.org/jira/browse/FLINK-14858
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.9.1
>            Reporter: zhaozhangwan
>            Assignee: zhaozhangwan
>            Priority: Trivial
>             Fix For: 1.10.0
>
>
> The line of SqlDropTable,this should be "else if" not the "if".
>  
> {code:java}
> // code placeholder
> public static Operation convert(FlinkPlannerImpl flinkPlanner, SqlNode 
> sqlNode) {
>    // validate the query
>    final SqlNode validated = flinkPlanner.validate(sqlNode);
>    SqlToOperationConverter converter = new 
> SqlToOperationConverter(flinkPlanner);
>    if (validated instanceof SqlCreateTable) {
>       return converter.convertCreateTable((SqlCreateTable) validated);
>    } if (validated instanceof SqlDropTable) {
>       return converter.convertDropTable((SqlDropTable) validated);
>    } else if (validated instanceof RichSqlInsert) {
>       return converter.convertSqlInsert((RichSqlInsert) validated);
>    } else if (validated.getKind().belongsTo(SqlKind.QUERY)) {
>       return converter.convertSqlQuery(validated);
>    } else {
>       throw new TableException("Unsupported node type "
>          + validated.getClass().getSimpleName());
>    }
> }{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to