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 2021/06/24 09:31:29 UTC

[GitHub] [shardingsphere] soulasuna opened a new issue #10971: Add unit test for shardingsphere-infra-binder

soulasuna opened a new issue #10971:
URL: https://github.com/apache/shardingsphere/issues/10971


   Hi community,
   
   This issue is for #10887.
   
   ## Aim
   Add unit test for shardingsphere-infra-binder project to test its public functions.
   
   ## Basic Qualifications
   - Java  
   - Maven  
   - Junit.Test
   
   ## Classes
   
   Add unit test for classes to test its public functions.
   
   - [ ] AnalyzeTableStatementContext
   - [ ] ExplainStatementContext
   - [ ] ShowColumnsStatementContext
   - [ ] ShowCreateTableStatementContext
   - [ ] ShowIndexStatementContext
   - [ ] DenyUserStatementContext
   - [ ] GrantStatementContext
   - [ ] RevokeStatementContext
   - [ ] AlterIndexStatementContext
   - [ ] AlterTableStatementContext
   - [ ] AlterViewStatementContext
   - [ ] CreateDatabaseStatementContext
   - [ ] CreateFunctionStatementContext
   - [ ] CreateIndexStatementContext
   - [ ] CreateProcedureStatementContext
   - [ ] CreateTableStatementContext
   - [ ] CreateViewStatementContext
   - [ ] DropIndexStatementContext
   - [ ] DropTableStatementContext
   - [ ] DropViewStatementContext
   - [ ] PrepareStatementContext
   - [ ] TruncateStatementContext
   
   
   ## Examples FYI
   - CallStatementContextTest


-- 
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] sydgeek commented on issue #10971: Add unit test for shardingsphere-infra-binder

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


   @strongduanmu 
   Hi, I found that class AlterViewStatement and class CreateViewStatement are very similar, however, their corresponding class XXXStatementContext constructors are different. If the CreateViewStatement is not an instance of MySQLStatement, Regardless of whether the SimpleTableSegment properties in the class CreateViewStatement are assigned, the properties in the TablesContext of the instantiated CreateViewStatementContext will be an empty collection. Is designed like this? Or it is a mistake. 


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] sydgeek commented on issue #10971: Add unit test for shardingsphere-infra-binder

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


   @strongduanmu I don't find somewhere use instance of DDLStatement, in other words, the TablesContext never be used.
   
   Some places(like ShardingInsertStatementValidator#preValidate) will validate tableName in the TablesContext, if it doesn't exist, an exception will be thrown.
   
   In git history, CreateViewStatementContext and AlterViewStatementContext are same at the beginning,  <a href='https://github.com/apache/shardingsphere/commit/e4428d6a4fb312a4579e8320e4e019b5d05dc5cc#diff-5586a6cfe067d10a31ca2cb888171a24cc28a2ede2390ec072026dff6ed15914'>AlterViewStatementContext</a>  was changed afterwards, but CreateViewStatementContext  never be changed.
   
   I am not familiar with their design, but I speculate that this is a mistake. However, you still need to decide whether it is wrong at the end.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] terrymanu closed issue #10971: Add unit test for shardingsphere-infra-binder

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


   


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] sydgeek commented on issue #10971: Add unit test for shardingsphere-infra-binder

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


   I want to take this issue.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] strongduanmu commented on issue #10971: Add unit test for shardingsphere-infra-binder

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


   @sydgeek Welcome.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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



[GitHub] [shardingsphere] strongduanmu commented on issue #10971: Add unit test for shardingsphere-infra-binder

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


   @sydgeek CreateViewStatement is an abstract class, the specific implementation needs to see MySQLCreateViewStatement or PostgreSQLCreateViewStatement. 
   
   I can't remember clearly why the implementation of CreateViewStatementContext and AlterViewStatementContext are different, you may need to investigate whether there is a problem.


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

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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