phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Taylor <jamestay...@apache.org>
Subject Re: Recursive queries?
Date Thu, 25 Sep 2014 03:43:34 GMT
Hey JM,
We'd like to support all of SQL-99 eventually, so based on that, it's
on our roadmap. Like most open source projects, we'd look for a
volunteer to take this on - it certainly meets the criteria of being
interesting.

I think priority-wise, it's lower than most of the join work
identified on our Roadmap (http://phoenix.apache.org/roadmap.html).
Would it be feasible to drive this through multiple client queries (1
per level) using the IN clause support we have (i.e. by generating a
query)? You could use UPSERT SELECT to dump the IDs you get back at
each level into a temp table if need be and join against it for the
next query.

Thanks,
James

On Wed, Sep 24, 2014 at 1:08 PM, Jean-Marc Spaggiari
<jean-marc@spaggiari.org> wrote:
> Hi,
>
> We have something like this that we want to "translate" into Phoenix
> (snippet):
>
>
>
> RETURN QUERY WITH RECURSIVE first_level AS (
> -- non-recursive term
>  (
>     SELECT a.id AS id FROM asset a
>        WHERE a.parent_id = p_id AND TYPE = 2
> )
> UNION
>   -- Recursive Term
>   SELECT a.id AS id FROM first_level fflf, asset a
>      WHERE a.parent_id = flf.id AND type = 2
> )
>
>
> Basically, let's consider we have millions of trees stored into HBase. For
> any node, we want to get all the children recursively.
>
> Is that something we can translate to Phoenix? If not, is it in the roadmap?
>
> Thanks,
>
> JM

Mime
View raw message