phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maryann Xue <maryann....@gmail.com>
Subject Re: Non-equi joins
Date Wed, 25 Mar 2015 16:32:57 GMT
Actually we do in 4.3, but apparently not in an efficient way. If no equi
conditions are specified, Phoenix simply does cross join and applies a post
filter to the cross joined results. And we do not support non-equi
conditions in ON clause, so non-equi outer join is currently impossible.
But if you are doing inner joins, you can adjust your query as:

SELECT * FROM T1, T2 WHERE T1.COL1 >= T2.COL2 AND T1.COL1 <= T2.COL3;


On Wed, Mar 25, 2015 at 9:29 AM, Jaime Solano <jdjsolano@gmail.com> wrote:

> Hi guys,
> I'm trying to figure out a way to join two tables with non-equi
> conditions. Basically, something like:
> SELECT * FROM T1 LEFT JOIN T2 ON T1.COL1 >= T2.COL2 AND T1.COL1 <= T2.COL3;
> I'm using Phoenix 4.2.0, which doesn't support non-equi joins.
> Is this feature supported in version 4.3? If not, is there a workaround to
> make it work in 4.2.0?
> Thanks in advance!
> -Jaime
>

Mime
View raw message