Aleksey Plekhanov created IGNITE-28577:
------------------------------------------

             Summary: Calcite engine.Condition with scalar NOT IN with large 
amount of operands hangs while planning 
                 Key: IGNITE-28577
                 URL: https://issues.apache.org/jira/browse/IGNITE-28577
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov


It takes to long for planning NOT IN with large amount of operands, for example:
{code:java}
        String in = IntStream.range(1, 
1000).mapToObj(Integer::toString).collect(Collectors.joining(", "));

        assertQuery("SELECT * FROM t WHERE i NOT IN (" + in + ")").check();
{code}
Hangs and throw an error after planner timeout.
But the same expression in projects works fine:
{code:java}
        String in = IntStream.range(1, 
1000).mapToObj(Integer::toString).collect(Collectors.joining(", "));

        assertQuery("SELECT i NOT IN (" + in + ") FROM t").check();
{code}
Condition with IN also works fine:

{code:java}
        String in = IntStream.range(1, 
1000).mapToObj(Integer::toString).collect(Collectors.joining(", "));

        assertQuery("SELECT * FROM t WHERE i IN (" + in + ")").check();
{code}
 



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

Reply via email to