Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-35935

CREATE TABLE AS doesn't work with LIMIT

    XMLWordPrintableJSON

Details

    Description

      CREATE TABLE WITH (foo) AS (SELECT * FROM bar LIMIT 5)

      The above statement throws "Caused by: java.lang.AssertionError: not a query: " exception.

      A workaround is to wrap the query with CTE.

      CREATE TABLE WITH (foo) AS (WITH R AS (SELECT * FROM bar LIMIT 5) SELECT * FROM R)

      Attachments

        Activity

          People

            xuyangzhong xuyang
            xccui Xingcan Cui
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: