[jira] [Created] (IGNITE-14156) SQL. Calcite: Does not return the count result if there are 0 elements in the table.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IGNITE-14156) SQL. Calcite: Does not return the count result if there are 0 elements in the table.

Anton Vinogradov (Jira)
Fedor Malchikov  created IGNITE-14156:
-----------------------------------------

             Summary:  SQL. Calcite: Does not return the count result if there are 0 elements in the table.
                 Key: IGNITE-14156
                 URL: https://issues.apache.org/jira/browse/IGNITE-14156
             Project: Ignite
          Issue Type: Bug
          Components: sql
            Reporter: Fedor Malchikov


Example:
{code:sql}
CREATE TABLE t1 ( id INT NOT NULL, int_col INT, PRIMARY KEY (id));
SELECT COUNT(*) FROM t1;
+--------------------------------+
|             EXPR$0             |
+--------------------------------+
+--------------------------------+
{code}
H2 return:
{code:java}
 SELECT COUNT(*) FROM t1;
+--------------------------------+
|            COUNT(*)            |
+--------------------------------+
| 0                              |
+--------------------------------+
{code}

if add some elements, then calcite return value:

{code:SQL}
SELECT COUNT(*) FROM t1;
+--------------------------------+
|             EXPR$0             |
+--------------------------------+
| 5                              |
+--------------------------------+
{code}





--
This message was sent by Atlassian Jira
(v8.3.4#803005)