Solve unsupported Postgres sql about alter statement for ShardingSphere Parser
- Mentors
- Trista Pan, Zhengqiang Duan, tuichenchuxin, dongzonglei
- Organization
- Apache Software Foundation
- Technologies
- java, ANTLR4
- Topics
- databases, parser
Apache ShardingSphere is positioned as a Database Plus, and aims at building a standard layer and ecosystem above heterogeneous databases. It focuses on how to reuse existing databases and their respective upper layer, rather than creating a new database. The goal is to minimize or eliminate the challenges caused by underlying database fragmentation.
ShardingSphere parser engine is the core of ShardingSphere, It helps users parse a SQL to get the AST (Abstract Syntax Tree) and visit this tree to get SQLStatement (Java Object). At present, this parser engine can handle SQLs for MySQL, PostgreSQL, SQLServer, openGauss and Oracle. However, there are still many statements that are not supported yet.
Therefore this project proposes to Solve unsupported Postgres sql about alter statements for ShardingSphere parser and also proofread and optimize the grammar wherever needed.
This project would require to proofread through DDLStatement.g4 to analyze existing grammars and optimize them (essential), write grammar for unsupported alter statements referring to the official PostgreSQL documentation (essential), implement visit methods for the statements (essential), add new corresponding SQL cases and expected parsed results (essential), Run SQLParserParameterizedTest and UnsupportedSQLParserParameterizedTest to make sure there are no exceptions (essential).
Successful Implementation of the project will add proper support for PostgreSQL Alter Statements ensuring there are no exceptions for the following statements, ALTER OPERATOR, ALTER POLICY, ALTER PUBLICATION, ALTER ROUTINE, ALTER RULE, ALTER SCHEMA, ALTER SEQUENCE, ALTER SERVER, ALTER STATISTICS, ALTER SUBSCRIPTION, ALTER TABLE, ALTER TEXT SEARCH,ALTER TRIGGER, ALTER TYPE, ALTER VIEW.
This project will significantly improve the ShardingSphere parser engine.