Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Denis Magda
Here is a “known limitations” section on readme.io: https://apacheignite.readme.io/docs/sql-queries#section-known-limitations Feel free to update it with the limitation discussed. — Denis > On Jun 1, 2017, at 1:19 PM, Dmitriy Setrakyan wrote: > > On Thu, Jun 1, 2017 at 1:07 PM, Sergi Vladykin

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Dmitriy Setrakyan
On Thu, Jun 1, 2017 at 1:07 PM, Sergi Vladykin wrote: > If you don't see an exception then it must be supported. This is the whole > point of this exception, right? > Exception is just to enforce the constraint. We still must clearly document what is supported.

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Sergi Vladykin
If you don't see an exception then it must be supported. This is the whole point of this exception, right? Sergi 2017-06-01 22:50 GMT+03:00 Dmitriy Setrakyan : > On Thu, Jun 1, 2017 at 12:32 PM, Sergi Vladykin > wrote: > > > I guess it must work the following way: > > > > If distributed joins a

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Dmitriy Setrakyan
On Thu, Jun 1, 2017 at 12:32 PM, Sergi Vladykin wrote: > I guess it must work the following way: > > If distributed joins are enabled we can try to prove that the subquery is > collocated, if we can't then try to rewrite it, if we can't, then throw an > exception. > > Still this can not be done 1

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Sergi Vladykin
I guess it must work the following way: If distributed joins are enabled we can try to prove that the subquery is collocated, if we can't then try to rewrite it, if we can't, then throw an exception. Still this can not be done 100% correct, probably we have to have some flag which allows to disab

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Dmitriy Setrakyan
Sergi, I am OK with any improvement here, but we need to be able to clearly state to a user what is supported and what is not. If we cannot clearly describe it, I would rather not support it at all and throw an exception. Is this going to be possible with your solution? D. On Thu, Jun 1, 2017 a

Re: nested SQL sub-queries with non-collocated joins

2017-06-01 Thread Sergi Vladykin
The approach you are suggesting will be very complex for current implementation. Also most probably very inefficient. Actually I was thinking about another but similar approach: in many cases we can rewrite a subquery in WHERE clause into JOIN subquery. Like the following: SELECT x.* FROM x WHER

nested SQL sub-queries with non-collocated joins

2017-05-31 Thread Dmitriy Setrakyan
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, wi