You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Yingyi Bu (JIRA)" <ji...@apache.org> on 2016/06/25 05:08:16 UTC

[jira] [Created] (ASTERIXDB-1500) Inject filters to eliminate null/missing join keys for equality joins

Yingyi Bu created ASTERIXDB-1500:
------------------------------------

             Summary: Inject filters to eliminate null/missing join keys for equality joins
                 Key: ASTERIXDB-1500
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1500
             Project: Apache AsterixDB
          Issue Type: Improvement
          Components: Optimizer
            Reporter: Yingyi Bu
            Assignee: Yingyi Bu


For the following query, there could be many tweets that has the field in_reply_to_status_id being null/missing. Therefore, that would skewness of for the hash join.  Since this is an inner join and missing/null join keys anyway could not produce qualified join results, the optimizer should inject null/missing filters before the join.

{noformat}
FROM Tweets t2 JOIN Tweets t1 ON t2.in_reply_to_status_id = t1.id
WHERE not(`is-unknown`(t2.in_reply_to_status_id))
GROUP BY t1.id AS id, t1.user.name AS name, t1.text AS text
SELECT id, name, text, COUNT(t2) AS num_retweets
ORDER BY num_retweets DESC
LIMIT 5;
{noformat}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)