calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Sereda <and...@sereda.cc>
Subject Re: Querying complex data with elastic search plugin
Date Tue, 21 May 2019 21:06:46 GMT
Hi Rahul,

> Can someone point me to sql examples on top of those data types?
For some query examples take a look at elastic tests:
https://github.com/apache/calcite/tree/master/elasticsearch/src/test/java/org/apache/calcite/adapter/elasticsearch

Regarding (1). I'm not sure elastic adapter currently supports terms query.
Probably this can be expressed in SQL as

'foo' in _MAP['tags'] or 'bar' in _MAP['tags']

For (2) probably it is a bug. Can you pls create a JIRA ticket and I'll
take a look ?

Thanks,
Andrei.


On Tue, May 21, 2019 at 4:19 PM rahul challapalli <
challapallirahul@gmail.com> wrote:

> Hi,
>
> My elasticsearch index contains arrays and nested fields. What is the level
> of support available to deal with those data types. Can someone point me to
> sql examples on top of those data types?
>
> 1. For arrays, lets say I have a tags field, I want to return all the
> records/docs which contain 1 or more specific tags
> 2. For nested datatypes, I tried query (a) and it worked. However query (b)
> returned empty results. Is it a bug or am I missing something?
>         a) select _MAP['a.b'] from "e"."tbl_idx" limit 5;
>              false
>              false
>              false
>              false
>              false
>         b) select _MAP['a.b'] from "e"."tbl_idx" where _MAP['a.b'] = false
>              No Results
>
> Thank You,
> Rahul
>

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