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 2020/09/17 16:32:00 UTC

[jira] [Commented] (IGNITE-10306) SQL: Transform subqueries to JOINs when possible

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

Konstantin Orlov commented on IGNITE-10306:
-------------------------------------------

This changes cover follow cases:
* rewrite subqueries from select list
* rewrite subqueries from table list
* rewrite subqueries in IN and EXISTS expression

For now only one-level subqueries are supported (nesting subqueries will be rewritten with some limitations).

[~tledkov-gridgain] do a review please

> SQL: Transform subqueries to JOINs when possible
> ------------------------------------------------
>
>                 Key: IGNITE-10306
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10306
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Vladimir Ozerov
>            Assignee: Konstantin Orlov
>            Priority: Major
>              Labels: iep-24
>
> Currently subqueries are mostly not analyzed in any way. This makes our distributed execution plan more complex to analyze and execute. Moreover, we cannot extract partition information from such queries efficiently. We need to apply the simplest "JOIN conversion" optimization on early query analysis phase and try to transform our AST from subquery to join. 
> This should be done before partition extraction, pushdowns and splitter. See [1] for more information.
> Postgres implementation of subquery rewrites could be found here [2].
> [1] https://cwiki.apache.org/confluence/display/IGNITE/IEP-24%3A+SQL+Partition+Pruning
> [2] https://github.com/postgres/postgres/blob/master/src/backend/optimizer/prep/prepjointree.c



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