Apache ShardingSphere — Proofread Oracle DML SQL Definitions — GSoC 2021

Thanoshan MV
2 min readAug 17, 2021

Apache ShardingSphere is an Open Source project that consists of three independent projects JDBC, Proxy, and Sidecar (Planning). Apache ShardingSphere utilizes ANother Tool for Language Recognition (ANTLR) as a generator for the ShardingSphere parse engine. Users can utilize this independent parse engine to get the Abstract Syntax Tree (AST) of a SQL. This parse engine supports multiple SQL dialects such as MySQL, PostgreSQL, SQLServer, Oracle, and SQL92.

ShardingSphere parse engine had basic Oracle Data Manipulation Language (DML) SQL definitions but didn’t align with Oracle documentation. I worked on proofreading the Oracle DML SQL definitions of ShardingSphere SQL parse engine as my Google Summer of Code (GSoC) 2021 project. Oracle DML SQL definition consists of SELECT , INSERT , UPDATE , and DELETE statements.

Contributions

As per my mentors’ suggestions, I created pull requests which consist of proofread changes and corresponding unit functions.

1. SELECT statement

As Oracle SELECT statement definition is complex and other DML statements depend on it, from the beginning I started working with it. I proofread SELECT statement via successive pull requests. Here is the list of successive pull requests I made:

2. INSERT statement

Here’s the pull request that I made to proofread Oracle INSERT statement:

3. DELETE statement

Here’s the pull request that I made to proofread Oracle DELETE statement:

4. UPDATE statement

Here’s the pull request that I made to proofread Oracle UPDATE statement:

Summary

The changes that I made will be included in the next release of Apache ShardingSphere to improve this parse engine.

Merged pull requests

Pull requests under code review

TODOs

After making changes in pull requests that are under code review, all the DML SQL definitions will be aligned with Oracle documentation. In the future, if there are any issues raised by users regarding Oracle DML SQL parsing, I’ll try to work on that as well.

In Apache ShardingSphere’s Oracle SQL parser codebase, there are some FIXMEs and TODOs that are commented on. I’ll try to work on them one by one.

Conclusion

It would be impossible to work on this project without my mentors’ support and guidance. I am grateful to my wonderful mentors Juan Pan and Guangyuan Wang. They are very friendly, flexible and have worked tirelessly to guide me. I would like to thank Apache ShardingSphere community for providing me with this wonderful opportunity.

Thank you!

--

--