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/08/31 14:33:00 UTC

[jira] [Updated] (IGNITE-14973) Calcite engine. IgniteLimit is pushed down under Exchange invalid

     [ https://issues.apache.org/jira/browse/IGNITE-14973?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Plekhanov updated IGNITE-14973:
---------------------------------------
    Labels: calcite3-required  (was: )

> Calcite engine. IgniteLimit is pushed down under Exchange invalid
> -----------------------------------------------------------------
>
>                 Key: IGNITE-14973
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14973
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Taras Ledkov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: calcite3-required
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In complex cases {{IgniteLimit}} is pushed down under Exchange node.
> *Steps to reproduce:*
> {code}
> CREATE TABLE test (a VARCHAR);
> INSERT INTO test VALUES ('aaa'), ('bbb'), ('ccc');
> CREATE TABLE test2 (a VARCHAR, b VARCHAR);
> INSERT INTO test2 VALUES ('blabla', 'b'), ('blabla2', 'c'), ('blabla3', 'd');
> SELECT NULLIF(NULLIF ((SELECT a FROM test ORDER BY a LIMIT 1 offset 1), a), b) FROM test2;
> {code}
> *Plan:*
> {code}
> IgniteProject(EXPR$0=[CASE(=(CASE(=($4, $2), null:VARCHAR CHARACTER SET "UTF-8", $5), $3), null:VARCHAR CHARACTER SET "UTF-8", CASE(=($4, $2), null:VARCHAR CHARACTER SET "UTF-8", $6))])
>   IgniteNestedLoopJoin(condition=[true], joinType=[left])
>     IgniteNestedLoopJoin(condition=[true], joinType=[left])
>       IgniteNestedLoopJoin(condition=[true], joinType=[left])
>         IgniteExchange(distribution=[single])
>           IgniteIndexScan(table=[[PUBLIC, TEST2]], index=[_key_PK])
>         IgniteExchange(distribution=[single])
>           IgniteLimit(offset=[1], fetch=[1])
>             IgniteIndexScan(table=[[PUBLIC, TEST]], index=[_key_PK], requiredColumns=[{2}])
>       IgniteExchange(distribution=[single])
>         IgniteLimit(offset=[1], fetch=[1])
>           IgniteIndexScan(table=[[PUBLIC, TEST]], index=[_key_PK], requiredColumns=[{2}])
>     IgniteExchange(distribution=[single])
>       IgniteLimit(offset=[1], fetch=[1])
>         IgniteIndexScan(table=[[PUBLIC, TEST]], index=[_key_PK], requiredColumns=[{2}])
> {code}



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