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/01/26 06:31:45 UTC

[GitHub] [shardingsphere] tristaZero opened a new issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   `CREATE/ALTER SHARDING RULE` supports multiple bindTable groups by the following RDLs.
   
   ```sql
   CREATE SHARDING RULE (
   binding_tables((t_order, t_item), (t1, t2, t3))
   ) 
   
   ALTER SHARDING RULE (
   binding_tables((t_order, t_item))
   )
   ```


----------------------------------------------------------------
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] terrymanu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   How about 
   
   ```sql
   CREATE SHARDING RULE (
   ...
   binding_table(t_order t_item)
   binding_table(t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_table(t_order t_item)
   )
   ```


----------------------------------------------------------------
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 #9168: [RDL] Support create/alter multiple bindTable groups

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


   


----------------------------------------------------------------
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] jingshanglu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   @terrymanu @tristaZero When create sharding rule, you can use multiple `binding_table`. When alter sharding rule, what is the meaning of using multiple `binding_table`?


----------------------------------------------------------------
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 #9168: [RDL] Support create/alter multiple bindTable groups

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


   Hi, @jingshanglu ,
   Thank for feedback.
   
   here are two ways to figure out this issue,
   ```sql
   // Add rule id for each bind rule
   
   CREATE SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   binding_table bt2 (t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   )
   
   // Keep current handling
   CREATE SHARDING RULE (
   ...
   binding_tables(t_order t_item, t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_tables(t_order t_item)
   )
   ```
   
   What do you think? @terrymanu 
   


----------------------------------------------------------------
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 #9168: [RDL] Support create/alter multiple bindTable groups

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


   After a brief discussion, here is the final conclusion,
   ```sql
   CREATE SHARDING RULE (
   ...
   binding_table (t_order t_item),
   binding_table (t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   add binding_table (t_order t_item t_new),
   drop binding_table (t_order t_item)
   )
   ```


----------------------------------------------------------------
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 #9168: [RDL] Support create/alter multiple bindTable groups

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


   Hi, @jingshanglu ,
   Thank for feedback.
   
   here are two ways to figure out this issue,
   ```sql
   // Add rule id for each bind rule
   
   CREATE SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   binding_table bt2 (t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   )
   
   // Keep current handling
   CREATE SHARDING RULE (
   ...
   binding_tables(t_order t_item, t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_tables(t_order t_item)
   )
   ```
   
   What do you think?
   


----------------------------------------------------------------
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] jingshanglu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   Now, `CREATE/ALTER SHARDING RULE` has supported multiple bindTable groups, like this:
   ```
   CREATE SHARDING RULE (
   ...
   binding_tables(t_order t_item, t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_tables(t_order t_item)
   )
   ```


----------------------------------------------------------------
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 #9168: [RDL] Support create/alter multiple bindTable groups

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


   Hi, @jingshanglu ,
   Thank for feedback.
   
   here are two ways to figure out this issue,
   ```sql
   // Add rule id for each bind rule
   
   CREATE SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   binding_table bt2 (t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_table bt1 (t_order t_item)
   )
   
   // Remain unchanged
   CREATE SHARDING RULE (
   ...
   binding_tables(t_order t_item, t1  t2  t3)
   ) 
   
   ALTER SHARDING RULE (
   ...
   binding_tables(t_order t_item)
   )
   ```
   
   What do you think? @terrymanu 
   


----------------------------------------------------------------
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] terrymanu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   I prefer add rule id for each bind rule, it is similar with original SQL
   By the way, the SQL ALTER should add operation type, such as `ADD, MODIFY, DROP`. For example:
   
   ```sql
   ALTER SHARDING RULE (
   ...
   MODIFY binding_table bt1 (t_order t_item)
   )
   ```


----------------------------------------------------------------
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] jingshanglu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   @terrymanu @tristaZero It is recommended to keep the status. when create or alter, the bindingTableGroup will be created or modified.


----------------------------------------------------------------
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] terrymanu commented on issue #9168: [RDL] Support create/alter multiple bindTable groups

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


   Cool, it is better, we do not need to change our SQLStatemtnt domain.


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