Hi Xiangdong, hi Giorgio, I will share my code soon but currently the code is heavy WIP. You can find it here in this branch: https://github.com/JulianFeinauer/incubator-iotdb/tree/experimental/typeless-backend
Places to look at are here: https://github.com/JulianFeinauer/incubator-iotdb/tree/experimental/typeless-backend/server/src/main/java/org/apache/iotdb/db/query/executor/calcite and https://github.com/JulianFeinauer/incubator-iotdb/blob/experimental/typeless-backend/server/src/main/java/org/apache/iotdb/db/query/executor/CalciteExecutor.java @Xiangdong: Calcite has support for Materialized views but basically there is (AFAIK!) no special support for indexes. But in some databases (e.g. Postgres) an Index is physically just a table (but that cannot be queried explicitly). So we could have e.g. a table that contains a previous result of a group by operation like a “materialized view” and the optimizer can then integrate it in the current plan, if it reduces the query costs. I also had a short discussion with Yuan Tian how this could look like, exactly. But I am happy for a wider discussion, of course : ) Best Julian Von: Xiangdong Huang <saint...@gmail.com> Datum: Montag, 17. Januar 2022 um 13:54 An: dev <dev@iotdb.apache.org> Betreff: Re: Usage of Relation Algebra, Calcite and Query Optimization in IoTDB Hi, This is a good way to make the query processing clear. > And in the next step, we could introduce INDEXES which in this scenario could be simply “materialized views” with pre-cached results that were again stored as a table. Does Calcite has frameworks for INDEXES? it beyonds my knowledge. BTW, we will have "SELECT INTO" in v0.13, which can store a query result into another series. And, we have "Trigger" which may allow users to generate "materialized views" if they want. And, it seems some guys in Alibaba introduced some related concept about "materialized views". Welcome to share. Best, ----------------------------------- Xiangdong Huang School of Software, Tsinghua University 黄向东 清华大学 软件学院 Giorgio Zoppi <giorgio.zo...@gmail.com> 于2022年1月11日周二 21:16写道: > Hello Julian, > could you point out the branch? What about just including what you need of > Calcite? > Best Regards, > Giorgio. >