You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/11/16 17:49:00 UTC

[jira] [Created] (IGNITE-10307) SQL: Extract partition info from JOINs

Vladimir Ozerov created IGNITE-10307:
----------------------------------------

             Summary: SQL: Extract partition info from JOINs
                 Key: IGNITE-10307
                 URL: https://issues.apache.org/jira/browse/IGNITE-10307
             Project: Ignite
          Issue Type: Task
          Components: sql
            Reporter: Vladimir Ozerov
             Fix For: 2.8


Currently we do not extract partitions when JOINs are involved. Let's implement it. We may start with relatively simple rules:
# No subqueries
# No GROUP BY
Then walk through JOINed tables and extract partitions from AND clauses. 

There are some tricky things to consider:
# Resulting model (tree) must be craefted carefully so that we can reuse it later in thin clients for efficient co-location.
# Resulting model may affect how we group tables during push-down phase. Probably this would be huuuge thing, so may be it is better to implement it in separate ticket
# When JOIN is performed partition info might be "transferred" between tables. E.g.:
{code}
a INNER JOIN b ON a.id = b.affinity_id WHERE a.id = :1
{code}
In this case if tables are co-located (we may infer it automatically in some cases), then {{a.id=:1}} partition rule can be "transferred" to {{b.affinity_id=:1}}.

Very good test coverage would be needed here.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)