There is class AbstractQueryable so you shouldn’t need to implement the whole 
interface by hand.

However, a better next step after FilterableTable is not QueryableTable, but 
Table with a few planner rules to push down filters, projects, etc. Calcite 
gets its intelligence from how rules compose at planning time - a few of your 
rules composing with a lot of built-in rules.

Maryann Xue spoke about using Calcite for Phoenix in 2016. Phoenix uses sorted 
tables (HBase) for both the primary tables and secondary indexes. Maryann’s 
talk is about how to model those tables in Calcite and get Calcite to choose 
between them. There are slides [1] and probably a video somewhere.

Julian

[1] https://www.slideshare.net/MaryannXue/phoenixoncalcitehadoopsummit2016 



> On Jan 25, 2024, at 2:36 AM, Ruben Q L <[email protected]> wrote:
> 
> Hello David,
> 
> AFAIK there is no such thing.
> It might be interesting for your case to take a look at this presentation
> [1], which includes a demo with the initial steps to combine Calcite and
> Lucene.
> 
> Best,
> Ruben
> 
> [1] https://youtu.be/meI0W12f_nw
> 
> 
> El jue, 25 ene 2024, 1:55, <[email protected]> escribió:
> 
>> Hello Calcite Devs,
>> 
>> I'm working on a data mocking system that's accessible via a relational
>> API: tables, columns, indexes, etc. I implemented a rudimentary query
>> runner layer from scratch, so the project is already usable in MVP
>> state. The next step would be the integration of Calcite.
>> 
>> For now, I have created an initial version by implementing the
>> ScannableTable interface. This was very easy, but the functionality is,
>> of course, slow due to the full table scan, as it does not make use of
>> the available indexes. There seems to be a big gap between
>> ScannableTable and QueryableTable. Implementing the Queryable interface
>> for QueryableTable manually is quite a lot of work.
>> 
>> Is there some existing or proposed method for the (probably common) case
>> where indexes are available for an otherwise scannable table? If I do
>> need to implement this manually, what should I look out for?
>> 
>> For context, here is the original storage API I defined for the MVP
>> version:
>> 
>> 
>> https://github.com/miniconnect/minibase/tree/master/projects/storage/src/main/java/hu/webarticum/minibase/storage/api
>> 
>> This is my current sketchy table adapter based on ScannableTable:
>> 
>> 
>> https://github.com/miniconnect/calcite-integration/blob/main/projects/minibase-calcite/src/main/java/hu/webarticum/minibase/calcite/driver/MinibaseCalciteTable.java
>> 
>> Thanks and regards,
>> Dávid Horváth

Reply via email to