You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/07/23 07:42:22 UTC

[GitHub] [shardingsphere] tristaZero opened a new issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

tristaZero opened a new issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417


   Hi community,
   This issue is to collate the SQL definitions of PostgreSQL. Therefore, we can support parsing more SQLs. 
   This issue needs your help. If you 
   1.Be familiar with `g4 file` of Antlr (The grammars are RegularExpression-like)
   2.Understand the `PostgreSQL grammars`
   then welcome!
   
   ### Background
   How is a SQL parsed?
   `SQL definition file` 
   ->(Parse to) 
   `AST`
   ->(Visit it)  
   `SQLStatment`
   
   
   
   
   ### Process
   1.Compare [Oficial SQL Doc](https://www.postgresql.org/docs/12/index.html) (Or [Source code](https://github.com/postgres/postgres/tree/REL_12_STABLE)) and [ShardingSphere SQL Doc](https://github.com/apache/shardingsphere/tree/master/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql)
   2. If there is any difference in ShardingSphere SQL Doc, please correct them referring to Official SQL Doc
   3. Run `mvn install the current_file_module` 
   4. Check whether there are any exceptions. If indeed, please fix them. (Especially `xxxVisitor.class`)
   5. Add new SQL case in [SQL Cases](https://github.com/apache/shardingsphere/tree/master/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/sql/supported) and expected parsed result in (Expected Statment XML)[https://github.com/apache/shardingsphere/tree/master/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/resources/case]
   6. Run [SQLParserParameterizedTest](https://github.com/apache/shardingsphere/blob/master/shardingsphere-sql-parser/shardingsphere-sql-parser-test/src/test/java/org/apache/shardingsphere/sql/parser/integrate/engine/SQLParserParameterizedTest.java) to make sure no exceptions.
   
   ### Notice
   1.`Left recursion` can not work well in Antlr4, 
   ```
   a
   : b
   | a b
   ;
   b
     : a c
     ;
   c
     : ...
     ;
   ```
   you can consider the following one,
   ```
   a
     : b*
     ;
   b
     : a c
     ;
   c
     : ...
     ;
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-662946353


   I want to try this task, can you assigne it to me?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero closed issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero edited a comment on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-662955197


   @strongduanmu Thanks for your comment.
   I am sorry to say this one is reserved for the students from [SUMMER2020](http://www.is.cas.cn/xshd2016/xshy2016/202004/t20200426_5563484.html) . 😿 
   
   BTW are you interested in `Collating the g4 file for SQLServer or Oracle`?
   The following similar issues are going online soon!
   
   Trista


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-662955197


   @strongduanmu Thanks for your comment, BTW are you interested in `Collating the g4 file for SQLServer or Oracle`? I am sorry to say this one is reserved for the students from [SUMMER2020](http://www.is.cas.cn/xshd2016/xshy2016/202004/t20200426_5563484.html) . 😿 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] strongduanmu commented on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-662976519


   > @strongduanmu Thanks for your comment.
   > I am sorry to say this one is reserved for the students from [SUMMER2020](http://www.is.cas.cn/xshd2016/xshy2016/202004/t20200426_5563484.html) . 😿
   > 
   > BTW are you interested in `Collating the g4 file for SQLServer or Oracle`?
   > The following similar issues are coming online soon!
   > 
   > Trista
   
   @tristaZero I'm so sorry 😂, and I will look for other unsolved issues.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-857563416


   #7243


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero edited a comment on issue #6417: [SQL Definition Collation][PostgreSQL]Collate the g4 files of SQL definitions

Posted by GitBox <gi...@apache.org>.
tristaZero edited a comment on issue #6417:
URL: https://github.com/apache/shardingsphere/issues/6417#issuecomment-662955197


   @strongduanmu Thanks for your comment.
   I am sorry to say this one is reserved for the students from [SUMMER2020](http://www.is.cas.cn/xshd2016/xshy2016/202004/t20200426_5563484.html) . 😿 
   
   BTW are you interested in `Collating the g4 file for SQLServer or Oracle`?
   The following similar issues are coming online soon!
   
   Trista


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org