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 <jja...@pinterest.com.invalid>
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
>

Reply via email to