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


   
   ### Requisites
   1. Have the basic learning about `ShardingStatementValidator`
   2. Java coding
   ---
   ### Aim-1
   1. This issue is to do some refactoring works to make the subquery 
validating cohesive.
   
   ### How-1
   1. Create a class`ShardingSelectStatementValidator` implements 
`ShardingStatementValidator`.
   2. Move the content of `checkSubqueryShardingValues` in 
`ShardingRouteDecorator` to the preValidate of 
`ShardingSelectStatementValidator`.
   ---
   
   Once `How-1` finishes, you can raize a PR. Moreover, there is a further 
to-do for Aim-2.
   ### Aim-2
   1. Review the validating logic and make all the subqueries in the `one 
database instance` run well. FYI, currently, subquery only with the same 
sharding key can work well, which limits the subquery supported scope where we 
can reach.
   
   ### How-2
   1. Review the preValidate function and fill the postValidate function in 
`ShardingSelectStatementValidator` to make the subqueries SQL routed in the 
same instance work well.
   2. Fix the @Ignore tests in `SubqueryRouteTest`
   3. Add a test case with a subquery SQL containing different sharding column 
names, like using order_id and item_id together.
   
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to