Mihai Budiu created CALCITE-5997:
------------------------------------
Summary: OFFSET operator is incorrectly unparsed
Key: CALCITE-5997
URL: https://issues.apache.org/jira/browse/CALCITE-5997
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.35.0
Reporter: Mihai Budiu
The following query:
{code:sql}
select ARRAY[p2,p1,p0][OFFSET(2)] from (values (6, 4, 2)) as t(p0, p1, p2)
{code}
when parsed as a SqlNode and then unparsed produces:
{code:sql}
SELECT ARRAY["P2", "P1", "P0"][2]
FROM (VALUES ROW(6, 4, 2)) AS "T" ("P0", "P1", "P2")
{code}
which no longer produces the same result (the OFFSET function call is missing).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)