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


   Hi, community,
   
   This issue is to create a unit test for  `CalciteJDBCExecutor`. Do you think 
it is an easy one? I am afraid it is not as you expected.
   
   Let me explain more to help you get into it. :)
   
   ### Introduction
   
   `CalciteJDBCExecutor` is an independent executor that makes a query across 
different database instances (Query federation) possible. Sound great, right?
   Thus, this issue is to test whether `CalciteJDBCExecutor` has the ability to 
execute SQLs with a single sharding table, SQLs joining two sharding tables, 
SQLs with a single table and a sharding table. (FYI [Table 
introduction](https://shardingsphere.apache.org/document/current/cn/features/sharding/concept/sql/))
   
   ### How
   - Create a test class for `CalciteJDBCExecutor`
   - Create a `ShardingSphereDataSource` to get `Map<String, 
ShardingSphereMetaData>` from 
`MetaDataContexts`(`AbstractShardingSphereDataSourceForShardingTest` will give 
you some points, I guess)
   - Create `CalciteContextFactory` by `Map<String, ShardingSphereMetaData>` 
acquired by the last step to get `CalciteContext`
   - Create `CalciteJDBCExecutor` using `CalciteContext`
   - Prepare diverse and fitting SQLs to cover a query with a sharding table, a 
query joining two sharding table, and a query with a sharding table and a 
single table
   - Test `executeQuery()` (All the tests in 
`org/apache/shardingsphere/driver/jdbc/core/statement` are good examples)
   - Test `close()`
   
   Do you want to give it a try, welcome! Any questions, please ping me here. 


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