git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scrolling in ElasticSearch adapter


Hi Christian,

Agree that (scroll) SQL keyword is an overkill. Need to check how JDBC
context can be accessed in RelNode(s).
If I remember correctly, relational algebra can also be evaluated outside
JDBC using RelBuilders (can't find an example right now).

Andrei.

On Wed, Oct 24, 2018 at 2:20 PM Christian Beikov <christian.beikov@xxxxxxxxx>
wrote:

> Hey,
>
> not sure if this should be an SQL keyword. JDBC specifies various
> constants that can be used at statement creation time:
> https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSet.html
>
> Not sure though if or how these configurations are accessible for data
> stores or dialects, but IMO using these would be the proper way.
>
> Regards
>
> Christian
>
> Am 24.10.2018 um 18:44 schrieb Andrei Sereda:
> > Hello,
> >
> >
> > I was thinking about adding [scrolling functionality](
> >
> https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
> )
> > to elastic search adapter. Since scrolling has non-negligible effect on
> the
> > cluster it should be selectively enabled on per query basis. So, likely,
> > user has to explicitly set "scroll flag" somewhere.
> >
> > Most natural way seems in SQL. [Calcite sql grammar](
> > https://calcite.apache.org/docs/reference.html) has `SCROLL` keyword
> > (unused to my knowledge). There were also discussions about adding hints
> to
> > Calcite.
> >
> > ### Examples
> > ```sql
> > -- special sql keyword ?
> > SCROLL select * from elastic;
> >
> > -- assuming hints are available in calcite
> > /* HINT: scroll */ select * from elastic;
> > ```
> >
> > What people think about this use-case ? Are there better ideas ?
> >
> > Regards,
> > Andrei.
> >
>