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

Parsed QueryOperation does not contain watermark in schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.11.2, 1.12.0
    • 1.12.0
    • Table SQL / API
    • None

    Description

      A parsed QueryOperation (e.g. from Parser#parse) does not contain the watermark information in its schema (QueryOperation#getTableSchema). The information does appear to be available in the calcite tree.

      This can be reproduced by creating a simple table with a watermark, e.g.:

      CREATE TABLE x (
        id INT,
        ts TIMESTAMP(3),
        WATERMARK FOR ts AS ts
      ) WITH (
        'connector' = 'datagen'
      )

      … and then parsing a statement like `SELECT * FROM x`.

      API-wise, QueryOperation is currently marked internal (and as such this is only marked as an improvement), but TableSchema is public-evolving, and if QueryOperation was as well this could be seen as a bug instead.

       

      Note that this might also affect other descendants of Operation which contain table schema information (I haven't tested all of them), e.g. CatalogQueryOperation.

      Attachments

        Activity

          People

            Unassigned Unassigned
            airblader Ingo Bürk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: