You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Maryann Xue (JIRA)" <ji...@apache.org> on 2014/10/14 20:26:34 UTC
[jira] [Updated] (PHOENIX-943) Handle pushed down post-filters for
subquery in joins with limit and non-groupby aggregation
[ https://issues.apache.org/jira/browse/PHOENIX-943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maryann Xue updated PHOENIX-943:
--------------------------------
Attachment: 943.patch
In join queries, independent filter conditions (as opposed to cross-table filter conditions) from WHERE clause of ON clause are pushed down to corresponding join tables as pre-filter conditions when applicable (certain restrictions apply to left/right outer joins).
If a join table is a sub-query (derived table), pushed-down pre-filters will finally get combined and rewritten into the sub-query itself. But in some rare cases like when the sub-query has a limit or the sub-query is a non-group-by aggregate query, the rewrite approach would not work, so we do client-side or server-side post filter on the sub-query result.
> Handle pushed down post-filters for subquery in joins with limit and non-groupby aggregation
> --------------------------------------------------------------------------------------------
>
> Key: PHOENIX-943
> URL: https://issues.apache.org/jira/browse/PHOENIX-943
> Project: Phoenix
> Issue Type: Sub-task
> Affects Versions: 3.0.0, 4.0.0, 5.0.0
> Reporter: Maryann Xue
> Assignee: Maryann Xue
> Priority: Minor
> Fix For: 3.0.0, 4.0.0, 5.0.0
>
> Attachments: 943.patch
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> Support cases like:
> 1) select ... from A join (select id, b from T limit 10) as B on A.id = B.id where B.b = 'b'
> 2) select ... from A join (select count(*) c from T) as B on A.a = B.c where B.c > 10
> These 2 cases cannot be handled by SubselectRewriter#applyPostFilters(), thus JoinCompiler should compile post-filters into query-plans for subqueries.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)