You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Zhenqiu Huang (Jira)" <ji...@apache.org> on 2020/01/17 17:57:00 UTC

[jira] [Commented] (FLINK-15644) Add support for SQL query validation

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

Zhenqiu Huang commented on FLINK-15644:
---------------------------------------

It is a very useful feature. Looking forward to it.

> Add support for SQL query validation 
> -------------------------------------
>
>                 Key: FLINK-15644
>                 URL: https://issues.apache.org/jira/browse/FLINK-15644
>             Project: Flink
>          Issue Type: New Feature
>          Components: Table SQL / API
>            Reporter: Fabian Hueske
>            Priority: Major
>
> It would be good if theĀ {{TableEnvironment}} would offer methods to check the validity of SQL queries. Such a method could be used by services (CLI query shells, notebooks, SQL UIs) that are backed by Flink and execute their queries on Flink.
> Validation should be available in two levels:
>  # Validation of syntax and semantics: This includes parsing the query, checking the catalog for dbs, tables, fields, type checks for expressions and functions, etc. This will check if the query is a valid SQL query.
>  # Validation that query is supported: Checks if Flink can execute the given query. Some syntactically and semantically valid SQL queries are not supported, esp. in a streaming context. This requires running the optimizer. If the optimizer generates an execution plan, the query can be executed. This check includes the first step and is more expensive.
> The reason for this separation is that the first check can be done much fast as it does not involve calling the optimizer. Hence, it would be suitable for fast checks in an interactive query editor. The second check might take more time (depending on the complexity of the query) and might not be suitable for rapid checks but only on explicit user request.
> Requirements:
>  * validation does not modify the state of the {{TableEnvironment}}, i.e. it does not add plan operators
>  * validation does not require connector dependencies
>  * validation can identify the update mode of a continuous query result (append-only, upsert, retraction).
> Out of scope for this issue:
>  * better error messages for unsupported features as suggested by FLINK-7217



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