Aleksey Plekhanov created IGNITE-15993:
------------------------------------------

             Summary: Calcite engine. Wrong result for single-value aggregation 
from empty source
                 Key: IGNITE-15993
                 URL: https://issues.apache.org/jira/browse/IGNITE-15993
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov


For example:
{noformat}
SELECT (SELECT 1 FROM (SELECT 1) WHERE 1 = 0)
{noformat}
Returns 0, but expected {{NULL}} or throw an exception.

With correlated queries result even more strange:

{noformat}
CREATE TABLE test (a INTEGER)
INSERT INTO test VALUES (1), (2), (null)
SELECT (SELECT 1 FROM test t WHERE a = test.a) FROM test
{noformat}
Returns 1, 1, 1 (expected 1, 1, NULL or throw an exception)

Related test {{test_correlated_subquery.test_ignore}}



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

Reply via email to