[
https://issues.apache.org/jira/browse/FLINK-35935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873763#comment-17873763
]
lincoln lee edited comment on FLINK-35935 at 8/15/24 11:24 AM:
---------------------------------------------------------------
Fixed in master: 729b8b81a77ba6c32711216b88a1bf57ccddfadc
1.19: 9c3c82835422e68441e936b378045b76aad894f9
1.20: c9729dc9201787b980c1d8b0ad05909fbf716bfb
was (Author: lincoln.86xy):
Fixed in master: 729b8b81a77ba6c32711216b88a1bf57ccddfadc
> CREATE TABLE AS doesn't work with LIMIT
> ---------------------------------------
>
> Key: FLINK-35935
> URL: https://issues.apache.org/jira/browse/FLINK-35935
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.18.1
> Reporter: Xingcan Cui
> Assignee: xuyang
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.0.0, 1.19.2, 1.20.1
>
>
> {code:java}
> CREATE TABLE WITH (foo) AS (SELECT * FROM bar LIMIT 5){code}
> The above statement throws "Caused by: java.lang.AssertionError: not a query:
> " exception.
> A workaround is to wrap the query with CTE.
> {code:java}
> CREATE TABLE WITH (foo) AS (WITH R AS (SELECT * FROM bar LIMIT 5) SELECT *
> FROM R){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)