Kirill Tkalenko created IGNITE-29034:
----------------------------------------
Summary: SQL Calcite: Add support for FROM DUAL queries
Key: IGNITE-29034
URL: https://issues.apache.org/jira/browse/IGNITE-29034
Project: Ignite
Issue Type: Improvement
Reporter: Kirill Tkalenko
Assignee: Kirill Tkalenko
Add support for the {{DUAL}} pseudo-table.
Calcite exposes this capability through
{{{}SqlConformance.isSupportedDualTable(){}}}, but Ignite does not currently
register {{DUAL}} in its schemas.
When this conformance option is enabled, {{DUAL}} should be exposed as a
virtual table with Oracle-compatible contents:
* Exactly one row.
* One column named {{{}DUMMY{}}}.
* Column value {{{}'X'{}}}.
The following queries should work:
{{}}
{noformat}
SELECT 1 + 1 FROM DUAL;
SELECT DUMMY FROM DUAL; SELECT LAG(rate, 1, rate) OVER (ORDER BY period) FROM
(SELECT 1 AS rate, 1 AS period FROM DUAL);
{noformat}
{{}}
Acceptance criteria:
* {{DUAL}} is registered when the active SQL conformance supports it.
* {{SELECT * FROM DUAL}} returns one row with {{{}DUMMY = 'X'{}}}.
* {{DUAL}} works in nested queries and with window functions.
* An existing user table or view named {{DUAL}} is not overwritten.
* Integration tests cover expressions, the {{DUMMY}} column, and window
functions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)