ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject nested SQL sub-queries with non-collocated joins
Date Wed, 31 May 2017 18:26:38 GMT
Igniters (specifically Sergi),

It has come to my attention today that nested sub-select statements, when
used in combination with non-collocated joins do not work properly in
Ignite.

So a query like this, where A, B, and C are all stored in Partitioned
caches and are **not** collocated at all, will not work.


> *select * from A, B where a.id <http://a.id> = b.a_id and b.somefield in
> (select somefield from C where c.zipcode = ?)*


The main reason it is not supported right now is because, in the absence of
collocation, such query may create N^N complexity and it was decided that
it is best not supporting it at all.

However, I am not sure why N^N complexity is required. Why not support it
as follows?

   1. execute the nested subquery and store the result in a temporary
   Replicated table.
   2. execute the original query and use the temporary Replicated table
   instead of the sub-query.

Sergi, given that you are the author of the code, can you provide some
insight here?

Thanks,
D.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message