GSoC 2023 — Apache ShardingSphere

Check out my Pull Requests on : click here

Hey ! I am Kanha gupta & I’ll be working on Apache Shardingsphere during my Google Summer of Code 2023 period.

As the community bonding period ends & Coding period begins, I would like to give a brief introduction of the work I’ll be doing.

Shardingsphere acts as a database proxy and provides support for various databases such as Mysql, postgreSQL, open gauss, sql server etc.It parses sql engine before sending the sql queries to databases for further processing.It contains sql parser engine to parse sql given by user & converts it into an AST nodethrough the lexer & parser process & then into a sql statement to extract features which is core input of kernel processor.

Kerner processor converts AST node to SQL node by using the Federation engine present in its architecture. As federation engine have the responsibility of converting all types of ASTNode to SQLNodes, it needs optimization to successfully provide support for different sql queries for different types of databases to keep the conversion successful so that calcite can be used to implement sql optimization and finally send it to the database for processing.

Right now Many of the sql queries don’t have support added yet & therefore if the user tries to use that sql, it throws a OptimizationSQLNodeconvertexception. During the GSOC period, I will work on adding support for new SELECT statement queries for MySQL in the federation engine.

I will work on adding support for new SQL queries for MySQL in shardingsphere’s federation engine so that they can be successfully converted to SQLNode for further computation.

Tech Stack required in the process :

-Advanced java

-maven

-Calcite

-ANTLR4

During the period, I will use ANTLR4 to parse SQL, understand SQL & to optimize the logic for it to successfully convert SQL statements to SQLNode. While adding support for all types of SELECT queries, the aim would be to check that it successfully is being parsed by ANTLR4 grammar files & then use calcite methods to implement the parsing on java for conversion. If both the task are successful, then conclusion can be made that the support for that particular query is successful.