Re: Running UNION ALL queries in parallel

2019-04-20 Thread Julian Hyde
Yes it does. Only ORDER BY causes order. 

Julian

> On Apr 20, 2019, at 12:17, Gian Merlino  wrote:
> 
> Hey Julian,
> 
> I think it'd be fine to issue the queries in parallel with a few
> adjustments. We'd want to avoid buffering, meaning we'd want to allow query
> results to be mixed together (return rows in the order they become
> available, rather than in query order sequence). I believe the SQL standard
> allows "UNION ALL" to behave this way, but we should double check that too.
> 
> On Fri, Apr 19, 2019 at 2:56 PM Julian Jaffe 
> wrote:
> 
>> Hey all,
>> 
>> Druid currently executes UNION ALL queries sequentially (
>> 
>> https://github.com/apache/incubator-druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidUnionRel.java#L98
>> ).
>> There's a comment in that method that restates this, but does not explain
>> why. Is there a reason why each subquery of a union all query can't be
>> executed in parallel?
>> 
>> Thanks,
>> Julian
>> 

-
To unsubscribe, e-mail: dev-unsubscr...@druid.apache.org
For additional commands, e-mail: dev-h...@druid.apache.org



Re: Running UNION ALL queries in parallel

2019-04-20 Thread Gian Merlino
Hey Julian,

I think it'd be fine to issue the queries in parallel with a few
adjustments. We'd want to avoid buffering, meaning we'd want to allow query
results to be mixed together (return rows in the order they become
available, rather than in query order sequence). I believe the SQL standard
allows "UNION ALL" to behave this way, but we should double check that too.

On Fri, Apr 19, 2019 at 2:56 PM Julian Jaffe 
wrote:

> Hey all,
>
> Druid currently executes UNION ALL queries sequentially (
>
> https://github.com/apache/incubator-druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidUnionRel.java#L98
> ).
> There's a comment in that method that restates this, but does not explain
> why. Is there a reason why each subquery of a union all query can't be
> executed in parallel?
>
> Thanks,
> Julian
>


Running UNION ALL queries in parallel

2019-04-19 Thread Julian Jaffe
Hey all,

Druid currently executes UNION ALL queries sequentially (
https://github.com/apache/incubator-druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidUnionRel.java#L98).
There's a comment in that method that restates this, but does not explain
why. Is there a reason why each subquery of a union all query can't be
executed in parallel?

Thanks,
Julian