RaigorJiang opened a new issue #12102:
URL: https://github.com/apache/shardingsphere/issues/12102


   Hi community,
   
   According to 
[DistSQL](https://shardingsphere.apache.org/document/current/en/features/dist-sql/syntax/rdl/rdl-sharding-rule/)
 syntax, users need to specify the resources to be used when execute `CREATE 
SHARDING TABLE RULE`. 
   For example:
   ```sql
   CREATE SHARDING TABLE RULE t_order (
   RESOURCES(resource_0,resource_1),
   ...
   );
   
   ```
   
   However, since only enumeration is currently supported, it will cause 
inconvenience to users when there are a large number of resources, like:
   ```sql
   CREATE SHARDING TABLE RULE t_order (
   
RESOURCES(resource_0,resource_1,resource_2,resource_3,resource_4,resource_5,resource_6,resource_7,resource_8,resource_9),
   ...
   ```
   
   Therefore, I want to improve `CREATE SHARDING TABLE RULE` syntax to support 
the configuration of resources through [inline 
expression](https://shardingsphere.apache.org/document/current/en/features/sharding/concept/inline-expression/),
 like:
   ```sql
   CREATE SHARDING TABLE RULE t_order (
   RESOURCES('resource_$->{0..9}'),
   ...
   );
   ```
   At the same time, inline expressions and enumerations are also allowed to be 
used together:
   ```sql
   CREATE SHARDING TABLE RULE t_order (
   RESOURCES('resource_$->{0..9}', 
resource_12,resource_15,"resource_$->{17..19}"),
   ...
   );
   ```
   > Notice: Inline expressions need to be enclosed in quotation marks


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to