You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2023/01/30 13:08:00 UTC

[jira] [Created] (IGNITE-18673) Sql. Set operations. Invalid column index in ORDER BY sometimes is not rejected

Maksim Zhuravkov created IGNITE-18673:
-----------------------------------------

             Summary: Sql. Set operations. Invalid column index in ORDER BY sometimes is not rejected
                 Key: IGNITE-18673
                 URL: https://issues.apache.org/jira/browse/IGNITE-18673
             Project: Ignite
          Issue Type: Bug
            Reporter: Maksim Zhuravkov


The first query fails:

{code:java}
SELECT a % 2, b FROM test UNION SELECT a % 2 AS k FROM test ORDER BY -1
{code}
Error:
{code:java}
From line 1, column 40 to line 1, column 49: Column count mismatch in UNION
{code}

But the second gets executed:
{code:java}
SELECT a % 2, b FROM test UNION SELECT a % 2 AS k, b FROM test ORDER BY -1
{code}

An error message produced by the first query gives us a clue that the ORDER BY clause is not checked at all.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)