[ 
https://issues.apache.org/jira/browse/COMDEV-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhengqiang Duan updated COMDEV-441:
-----------------------------------
    Description: 
Apache ShardingSphere
Apache ShardingSphere is a distributed database middleware ecosystem, including 
2 independent products, ShardingSphere JDBC and ShardingSphere Proxy presently. 
They all provide functions of data sharding, distributed transaction, and 
database orchestration.
{*}Page{*}: 
[https://shardingsphere.apache.org|https://shardingsphere.apache.org/]
{*}Github{*}: [https://github.com/apache/shardingsphere]
h2. Background
ShardingSphere parser engine 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`, which means we have to understand different database 
dialect SQLs.
 
{*}More details{*}:
https://shardingsphere.apache.org/document/current/en/reference/sharding/parse/
h2. Task
This issue is to solve the unsupported postgres sql about alter in [this 
file|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml]
 . * 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

 
You can *learn more* 
[here|https://www.postgresql.org/docs/current/sql-commands.html]. * 
You may need to try to get why it's not supported.(antlr4 grammar? or not 
implement visit method) You can use [antlr4 
plugins|https://plugins.jetbrains.com/plugin/7358-antlr-v4] to help you to 
analyze. You may need to visit [an official 
doc|https://www.postgresql.org/docs/current/sql-commands.html] to check the 
grammar.

 * 
After you fix it, remember to add a new corresponding SQL case in [SQL 
Cases|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported]
 and expected parsed result in [Expected Statment 
XML|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case].

 * Run 
[SQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/SQLParserParameterizedTest.java]
 and 
[UnsupportedSQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/UnsupportedSQLParserParameterizedTest.java]
 to make sure no exceptions.

 
{*}Notice{*}, these issues can be a good example.
[support alter foreign table for pg/og 
|https://github.com/apache/shardingsphere/pull/14944]
[support alter materialized view for 
pg/og.|https://github.com/apache/shardingsphere/pull/15331]
h2. Relevant Skills
1. Master JAVA language
2. Have a basic understanding of Antlr g4 file
3. Be familiar with Postgres SQLs
h2. Targets files
1. Postgres SQLs g4 file: 
https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
h2. Mentor

Zhengqiang Duan, Committer of Apache ShardingSphere, duanzhengqi...@apache.org
Haoran Meng, PMC of Apache ShardingSphere, menghao...@apache.org

  was:
h2. Apache ShardingSphere

Apache ShardingSphere is a distributed database middleware ecosystem, including 
2 independent products, ShardingSphere JDBC and ShardingSphere Proxy presently. 
They all provide functions of data sharding, distributed transaction, and 
database orchestration.

*Page*: https://shardingsphere.apache.org
*Github*: https://github.com/apache/shardingsphere

h2. Background

ShardingSphere parser engine 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`, which means we have to understand different database 
dialect SQLs.

*More details*: 
https://shardingsphere.apache.org/document/current/en/reference/sharding/parse/

h2. Task

This issue is to solve the unsupported postgres sql about alter in [this 
file|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml].
- 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

You can learn more 
[here|https://www.postgresql.org/docs/current/sql-commands.html].

- You may need to try to get why it's not supported.(antlr4 grammar? or not 
implement visit method) You can use [antlr4 
plugins|https://plugins.jetbrains.com/plugin/7358-antlr-v4] to help you to 
analyze. You may need to visit an [official 
doc|https://www.postgresql.org/docs/current/sql-commands.html] to check the 
grammar.
- After you fix it, remember to add a new corresponding SQL case in [SQL 
Cases|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported]
 and expected parsed result in [Expected Statment 
XML|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case].
- Run 
[SQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/SQLParserParameterizedTest.java]
 and 
[UnsupportedSQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/UnsupportedSQLParserParameterizedTest.java]
 to make sure no exceptions.

*Notice*, these issues can be a good example.
[support alter foreign table for pg/og 
|https://github.com/apache/shardingsphere/pull/14944]
[support alter materialized view for 
pg/og|https://github.com/apache/shardingsphere/pull/15331]

h2. Relevant Skills

1. Master JAVA language
2. Have a basic understanding of Antlr g4 file
3. Be familiar with Postgres SQLs

h2. Targets files

1. Postgres SQLs g4 file: 
https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4

h2. Mentor

Zhengqiang Duan, Committer of Apache ShardingSphere, duanzhengqi...@apache.org
Haoran Meng, PMC of Apache ShardingSphere, menghao...@apache.org




> Apache ShardingSphere: Solve unsupported Postgres sql about alter statement 
> for ShardingSphere Parser
> -----------------------------------------------------------------------------------------------------
>
>                 Key: COMDEV-441
>                 URL: https://issues.apache.org/jira/browse/COMDEV-441
>             Project: Community Development
>          Issue Type: Improvement
>          Components: GSoC/Mentoring ideas
>            Reporter: Zhengqiang Duan
>            Priority: Major
>              Labels: Mentor, ShardingSphere, gsoc2022
>
> Apache ShardingSphere
> Apache ShardingSphere is a distributed database middleware ecosystem, 
> including 2 independent products, ShardingSphere JDBC and ShardingSphere 
> Proxy presently. They all provide functions of data sharding, distributed 
> transaction, and database orchestration.
> {*}Page{*}: 
> [https://shardingsphere.apache.org|https://shardingsphere.apache.org/]
> {*}Github{*}: [https://github.com/apache/shardingsphere]
> h2. Background
> ShardingSphere parser engine 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`, which means we have to understand 
> different database dialect SQLs.
>  
> {*}More details{*}:
> https://shardingsphere.apache.org/document/current/en/reference/sharding/parse/
> h2. Task
> This issue is to solve the unsupported postgres sql about alter in [this 
> file|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/unsupported/unsupported.xml]
>  . * 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
>  
> You can *learn more* 
> [here|https://www.postgresql.org/docs/current/sql-commands.html]. * 
> You may need to try to get why it's not supported.(antlr4 grammar? or not 
> implement visit method) You can use [antlr4 
> plugins|https://plugins.jetbrains.com/plugin/7358-antlr-v4] to help you to 
> analyze. You may need to visit [an official 
> doc|https://www.postgresql.org/docs/current/sql-commands.html] to check the 
> grammar.
>  * 
> After you fix it, remember to add a new corresponding SQL case in [SQL 
> Cases|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/sql/supported]
>  and expected parsed result in [Expected Statment 
> XML|https://github.com/apache/shardingsphere/tree/master/shardingsphere-test/shardingsphere-parser-test/src/main/resources/case].
>  * Run 
> [SQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/SQLParserParameterizedTest.java]
>  and 
> [UnsupportedSQLParserParameterizedTest|https://github.com/apache/shardingsphere/blob/master/shardingsphere-test/shardingsphere-parser-test/src/main/java/org/apache/shardingsphere/test/sql/parser/parameterized/engine/UnsupportedSQLParserParameterizedTest.java]
>  to make sure no exceptions.
>  
> {*}Notice{*}, these issues can be a good example.
> [support alter foreign table for pg/og 
> |https://github.com/apache/shardingsphere/pull/14944]
> [support alter materialized view for 
> pg/og.|https://github.com/apache/shardingsphere/pull/15331]
> h2. Relevant Skills
> 1. Master JAVA language
> 2. Have a basic understanding of Antlr g4 file
> 3. Be familiar with Postgres SQLs
> h2. Targets files
> 1. Postgres SQLs g4 file: 
> https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/org/apache/shardingsphere/sql/parser/autogen/PostgreSQLStatement.g4
> h2. Mentor
> Zhengqiang Duan, Committer of Apache ShardingSphere, duanzhengqi...@apache.org
> Haoran Meng, PMC of Apache ShardingSphere, menghao...@apache.org



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
For additional commands, e-mail: dev-h...@community.apache.org

Reply via email to