drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jinfeng Ni <jinfengn...@gmail.com>
Subject Re: Query on Array
Date Thu, 30 Oct 2014 21:36:35 GMT
I think Drill currently does not allow to put a array in the = predicate.

With the complex type such array/map,  the semantics of = operator is not
clearly defined.  In other words,  we need decide whether "=" means
existence of a pair of values from the two lists satisfying the comparison,
or the two lists are exactly same.  (btw: In XQuery,  "=" uses the
semantics of existence, while the traditional = semantics is represented by
value comparison operator "eq").  We probably first need define the
semantics of comparison operator for complex type, then add the support to
put such complex data operators into  join predicate .






On Thu, Oct 30, 2014 at 11:57 AM, MohammadReza Mofateh <mofateh72@gmail.com>
wrote:

> Hi
> Thank you.
> I do successfully query on JSON ,But problems on *Arrays*.
> Table A:
> row_key,i:year (value is a year, for e.g.  : 1993)
> Table B:
> row_key,i:yearsLived (value is an array,for e.g. :    "yearsLived":
> ["1990", "1993", "1998", "2008"])
> I put exactly : "yearsLived": ["1990", "1993", "1998", "2008"] into
> B.i.yearsLived
> And I want to Join on them like:
> Select * from A join B on hbase.A.i.year=hbase.B.i.yearsLived
>
> How do I implement this query?
> Is it possible to implementing in Apache drill?Do you have any idea?
>
> I'm using version 0.5.0.
>
> Best
>
> On Thu, Oct 30, 2014 at 7:50 PM, Jacques Nadeau <jacques@apache.org>
> wrote:
> >
> > Can you go into more detail about the data is structured in HBase?
> > Especially in table B.  HBase doesn't have built in data types so people
> > typically need to CONVERT_FROM a format (including JSON).  The docs are
> > here:
> >
>
> https://cwiki.apache.org/confluence/display/DRILL/SQL+Functions#SQLFunctions-ConvertFunctions
> >
> > Note that for some reason, JSON isn't listed in that list.  It is
> available
> > for conversion as well.
> >
> > On Thu, Oct 30, 2014 at 1:02 AM, MohammadReza Mofateh <
> mofateh72@gmail.com
> >
> > wrote:
> >
> > > Hi,
> > > I can't find a tutorial explaining how to get started with Drill
> (besides
> > > querying the sample data that comes with Drill like Arrays or JSON).
> > >
> > > I have some Array data on HBASE that I would like to query (Join
> row_keys
> > > of table A with Arrays in table B)
> > > , how do I query?
> > >
> > > I asked a way for JSON but no body didn't answer me.But I found the
> way.
> > >
> > > Best
> > >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message