You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "cen yuhai (JIRA)" <ji...@apache.org> on 2017/11/10 08:35:00 UTC

[jira] [Updated] (SPARK-22491) union all can't execute parallel with group by

     [ https://issues.apache.org/jira/browse/SPARK-22491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

cen yuhai updated SPARK-22491:
------------------------------
    Description: 
test sql
{code}
create table temp.test_yuhai_group 
as 
select 
       city_name
       ,sum(amount)
 from  temp.table_01 
 group by city_name
 union all
 select 
       city_name
       ,sum(amount)
 from  temp.table_01  
 group by city_name
 union all
 select city_name
       ,sum(amount)
 from  temp.table_01
 group by city_name
{code}
if I remove group by ,it is ok
{code}
create table temp.test_yuhai_group 
as 
select 
       city_name
 from  temp.table_01 
 union all
 select 
       city_name
 from  temp.table_01  
 union all
 select city_name
 from  temp.table_01
{code}



  was:
test sql
```sql
create table temp.test_yuhai_group 
as 
select 
       city_name
       ,sum(amount)
 from  temp.table_01 
 group by city_name
 union all
 select 
       city_name
       ,sum(amount)
 from  temp.table_01  
 group by city_name
 union all
 select city_name
       ,sum(amount)
 from  temp.table_01
 group by city_name
```
if I remove group by ,it is ok
```sql
create table temp.test_yuhai_group 
as 
select 
       city_name
 from  temp.table_01 
 union all
 select 
       city_name
 from  temp.table_01  
 union all
 select city_name
 from  temp.table_01
```




> union all can't execute parallel with group by 
> -----------------------------------------------
>
>                 Key: SPARK-22491
>                 URL: https://issues.apache.org/jira/browse/SPARK-22491
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.1.2
>            Reporter: cen yuhai
>
> test sql
> {code}
> create table temp.test_yuhai_group 
> as 
> select 
>        city_name
>        ,sum(amount)
>  from  temp.table_01 
>  group by city_name
>  union all
>  select 
>        city_name
>        ,sum(amount)
>  from  temp.table_01  
>  group by city_name
>  union all
>  select city_name
>        ,sum(amount)
>  from  temp.table_01
>  group by city_name
> {code}
> if I remove group by ,it is ok
> {code}
> create table temp.test_yuhai_group 
> as 
> select 
>        city_name
>  from  temp.table_01 
>  union all
>  select 
>        city_name
>  from  temp.table_01  
>  union all
>  select city_name
>  from  temp.table_01
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org