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

Aleksey Plekhanov commented on IGNITE-14916:
--------------------------------------------

Reproducer for the problem:
{code:java}
/** */
@Test
public void testHashSpoolCondition() {
    executeSql("CREATE TABLE t(i INTEGER)");
    executeSql("INSERT INTO t VALUES (0), (1), (2)");

    String sql = "SELECT i, (SELECT i FROM t WHERE i=t1.i AND i-1=0) FROM t AS 
t1";

    assertQuery(sql)
        .matches(QueryChecker.containsSubPlan("IgniteHashIndexSpool"))
        .returns(0, null)
        .returns(1, 1)
        .returns(2, null)
        .check();
}{code}
[~tledkov-gridgain], are you going to fix this?

> Calcite. FilterSpoolMergeToHashIndexSpoolRule need to be applicable only if 
> all conditions are covered.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-14916
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14916
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Evgeny Stanilovsky
>            Assignee: Taras Ledkov
>            Priority: Major
>              Labels: calcite, calcite2-required, calcite3-required
>
> FilterSpoolMergeToHashIndexSpoolRule can return erroneous results cause it 
> takes into account only _searchRow_ which can be partial representation of 
> _condition_.



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

Reply via email to