Question about FilterIntoJoinRule

2019-09-12 Thread Thomas D'Silva
We are using calcite to query data in Kudu. We have implemented our own sort rule that merges rows returned from kudu when a queries orders by columns in the same order as the primary key of the kudu table. For a query that does a left join, in order to get the planner to use my sort rule I had to

Re: Question about FilterIntoJoinRule

2019-09-13 Thread Stamatis Zampetakis
Hi Thomas, It is not safe to push the filter in the null generating side of a join since it changes the semantics of the query. Consider the example below. SELECT b.title FROM Book b LEFT JOIN Author a ON b.author = a.id WHERE a.name <> 'Victor' Author -- id | name | 1 | Victor |

Re: Question about FilterIntoJoinRule

2019-09-13 Thread Thomas D'Silva
Stamatis, Thank you for your explanation, this makes sense now. On Fri, Sep 13, 2019 at 2:58 PM Stamatis Zampetakis wrote: > Hi Thomas, > > It is not safe to push the filter in the null generating side of a join > since > it changes the semantics of the query. Consider the example below. > > SE