You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Konstantin Orlov (Jira)" <ji...@apache.org> on 2021/08/26 19:32:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17405437#comment-17405437 ] 

Konstantin Orlov commented on IGNITE-14973:
-------------------------------------------

[~alex_pl], the patch looks good to me.

> 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
>          Time Spent: 10m
>  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)