Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5997

OFFSET operator is incorrectly unparsed

    XMLWordPrintableJSON

Details

    Description

      The following query:

      select ARRAY[p2,p1,p0][OFFSET(2)] from (values (6, 4, 2)) as t(p0, p1, p2)
      

      when parsed as a SqlNode and then unparsed produces:

      SELECT ARRAY["P2", "P1", "P0"][2]
      FROM (VALUES ROW(6, 4, 2)) AS "T" ("P0", "P1", "P2")
      

      which no longer produces the same result (the OFFSET function call is missing).

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: