[
https://issues.apache.org/jira/browse/PHOENIX-7397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
chenglei updated PHOENIX-7397:
------------------------------
Description:
A common use case of union all is to union multiple homogeneous tables and then
further aggregate or sort , just as following sql statements:
{code:java}
select A, B,C, sum(...),sum(....)
from (
select a1 A, b1 B,c1 C, ....
from T1
union all
select a2,b2,c2,.....
from T2
union all
select a3,b3,c3, ....)
group by A,B,C
having....
{code}
{code:java}
select A, B,C, sum(...),sum(....)
from (
select a1 A, b1 B,c1 C, ....
from T1
union all
select a2,b2,c2,.....
from T2
union all
select a3,b3,c3, ....)
group by A,B,C
having....
{code}
> Optimize ClientAggregatePlan/ClientScanPlan when inner query plan is UnionPlan
> ------------------------------------------------------------------------------
>
> Key: PHOENIX-7397
> URL: https://issues.apache.org/jira/browse/PHOENIX-7397
> Project: Phoenix
> Issue Type: Improvement
> Components: core
> Affects Versions: 5.2.0, 5.1.3
> Reporter: chenglei
> Priority: Major
>
> A common use case of union all is to union multiple homogeneous tables and
> then further aggregate or sort , just as following sql statements:
> {code:java}
> select A, B,C, sum(...),sum(....)
> from (
> select a1 A, b1 B,c1 C, ....
> from T1
> union all
> select a2,b2,c2,.....
> from T2
> union all
> select a3,b3,c3, ....)
> group by A,B,C
> having....
> {code}
> {code:java}
> select A, B,C, sum(...),sum(....)
> from (
> select a1 A, b1 B,c1 C, ....
> from T1
> union all
> select a2,b2,c2,.....
> from T2
> union all
> select a3,b3,c3, ....)
> group by A,B,C
> having....
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)