tristaZero opened a new issue #8284: URL: https://github.com/apache/shardingsphere/issues/8284
Hi community, As you know, ShardingSphere has made a lot of efforts on SQL parser and **provided a great independent SQL parser** to help users parse SQL. Based on this substantial work, we **plan to do query optimization** to optimize the input SQLs from users and produce an optimized SQL query plan to improve query efficiency. Plus, **the federated SQL query feature** (Like join query from different instances) is another essential highlight for our next release. : ) We will leverage [Apache Calcite](https://calcite.apache.org), an excellent framework to implement two of the features. Currently, three main work focus are presented here. - [x] The investigation of **RBO** (Rule-Based Optimization) and **CBO** (Cost-Based optimization) ,i.e., Hep planner engine and Volcano planner engine. (**Mechanism, usage, pros and cons**). - [x] The investigation of Calcite adaptor, especially `TranslatableTable` API. - [x] How to transform the parsed result of ShardingSphere to the algebra of Calcite - [x] Call some of the optimization rules to process the relational expression - [x] Implement Calcite adaptor to join SQLs from different instances - [x] Combine sharding tables with Calcite adaptors. Actually, there are plenty of works to do on this issue. We are **in the investigation phase** now and will seek contributors for this issue later. If you are interested in this one, please give it a watch. 😉 --- ### 10th January 2021 Task Update Hi, community, Here is the progress update so far. ### Functions - [x] The **research** on the source code and API of Apache Calcite - [x] The **design plan** on Apache ShardingSphere and Apache Calcite - [x] The implementation of `CalciteLogicSchemaFactory`, `CalciteLogicSchema`, and `CalciteFilterableTable` - [x] The Calcite JDBC executor - [x] The **work embedding with** initialization, router, and executor with ShardingSphere - [ ] Use ShardingSphere **parser** instead of the Calcite parser to parse SQL (SqlNodeConverter, @guimingyue) (Q2) - [ ] Custom **planner** for SQL Optimization(PlannerInitializer, @guimingyue ) (Q2) - [ ] SQL Optimization for `CalciteFilterableTable` (CalciteExecutionSQLGenerator) (Q2) - [ ] The implement for `CalciteRawExecutor` (Especially `ResultSetMetadata`) (Q2) - [ ] The **SQLRouter** of ShardingSphere to route SQL to `CalciteExecutor` (Q2) ### Unit test (Q2) - [x] CalciteContextFactory - [x] CalciteLogicSchemaFactory(Doing, #8965) - [x] CalciteJDBCExecutor(Doing, #8883) - [ ] CalciteRawExecutor(TODO) - [ ] CalciteExecutionSQLGenerator(TODO) - [x] CalciteExecutionContextGenerator ### SQL Federation - [x] Binding tables (Native) - [x] Single table and Broadcast table (Native) - [x] Sharding table and Broadcast table (Native) - [x] Broadcast table and Broadcast table (Native) - [x] Single table and Single table + UT - [x] Single table and Sharding table + UT(Q2) - [x] Sharding table and Sharding table + UT (Q2) ### Scenario - [x] Sharding - [ ] Sharding + ReplicaQuery (Q2) - [ ] Sharding + Encryption (Q2) - [x] Sharding + Encryption + ReplicaQuery (Q2) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
