[
https://issues.apache.org/jira/browse/FLINK-17852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17112737#comment-17112737
]
Jark Wu commented on FLINK-17852:
---------------------------------
This should already be supported in Flink, we have some tests using this
syntax:
https://github.com/apache/flink/blob/master/flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/rules/logical/subquery/SubQuerySemiJoinTest.scala#L1466
However, we missed to add documentations.
> FlinkSQL support WITH clause in query statement
> -----------------------------------------------
>
> Key: FLINK-17852
> URL: https://issues.apache.org/jira/browse/FLINK-17852
> Project: Flink
> Issue Type: New Feature
> Components: Table SQL / API
> Reporter: sam lin
> Priority: Major
>
> Many modern SQL language support WITH clause in query statement. e.g.
> ```
> WITH myName AS (
> select * from table where ...
> )
> select column1 from myName
> ```
> e.g. In BeamSQL supports this:
> [https://beam.apache.org/documentation/dsls/sql/calcite/query-syntax/]
> query_statement: [ WITH with_query_name AS ( query_expr ) [, ...] ]
> query_expr.
> In presto, supports this as well:
> [https://prestodb.io/docs/current/sql/select.html#with-clause]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)