You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Xingcan Cui (Jira)" <ji...@apache.org> on 2024/08/09 12:44:00 UTC
[jira] [Assigned] (FLINK-35935) CREATE TABLE AS doesn't work with LIMIT
[ https://issues.apache.org/jira/browse/FLINK-35935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xingcan Cui reassigned FLINK-35935:
-----------------------------------
Assignee: Xingcan Cui
> 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: Xingcan Cui
> Priority: Major
> Labels: pull-request-available
>
> {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)