You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2021/11/23 14:29:00 UTC

[jira] [Commented] (IGNITE-15588) Calcite. Expression 'I' is not being grouped.

    [ https://issues.apache.org/jira/browse/IGNITE-15588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17448048#comment-17448048 ] 

Aleksey Plekhanov commented on IGNITE-15588:
--------------------------------------------

It's a strange syntax, should we really support it?

In my opinion, such a query should check EXISTS query for each row of the outer query and should return the corresponding number of rows, but here only one row is expected, and the query inside EXISTS is incorrect.

> Calcite. Expression 'I' is not being grouped.
> ---------------------------------------------
>
>                 Key: IGNITE-15588
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15588
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required, ignite-3
>
> {noformat}
> statement ok
> CREATE TABLE integers(i INTEGER)
> statement ok
> INSERT INTO integers VALUES (1), (2), (3), (NULL)
> query T
> SELECT EXISTS(SELECT i+MIN(i1.i) FROM integers WHERE i=3) FROM integers i1;
> ----
> true
> {noformat}
> {noformat}
> org.apache.calcite.runtime.CalciteContextException: At line 1, column 22: Expression 'I' is not being grouped
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> 	at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:506)
> 	at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:917)
> 	at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:902)
> {noformat}
> {noformat}
> /subquery/exists/test_correlated_exists.test
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)