mirror of https://github.com/apache/druid.git
c98e7c3aa3
This PR fixes the incorrect results for query : SELECT dim1, l1.k FROM foo LEFT JOIN (select k || '' as k from lookup.lookyloo group by 1) l1 ON foo.dim1 = l1.k WHERE l1.k IS NOT NULL (in CalciteQueryTests) In the current code, the WHERE clause gets removed from the top of the left join and is pushed to the table foo leading to incorrect results. The fix for such a situation is done by : Converting such left joins into inner joins (since logically the mentioned left join query is equivalent to an inner join) using Calcite while maintaining that the druid execution layer can execute such inner joins. Preferring converted inner joins over original left joins in our cost model |
||
---|---|---|
.. | ||
src | ||
pom.xml |