wjf870128 opened a new issue #15442:
URL: https://github.com/apache/shardingsphere/issues/15442


   shardingsphere-proxy : 5.1.0
   DistSQL step:
   1)CREATE SHARDING KEY GENERATOR snowflake_key_generator 
(TYPE(NAME=SNOWFLAKE));
   2)CREATE SHARDING ALGORITHM database_inline (
   TYPE(NAME=inline,PROPERTIES("algorithm-expression"="ts_${user_id % 4}"))
   );
   3)CREATE SHARDING ALGORITHM table_inline (
   TYPE(NAME=inline,PROPERTIES("algorithm-expression"="t_order_${order_id % 
4}"))
   );
   4)CREATE SHARDING TABLE RULE t_order (
   DATANODES("ts_${0..3}.t_order_${0..3}"),
   
DATABASE_STRATEGY(TYPE=standard,SHARDING_COLUMN=user_id,SHARDING_ALGORITHM=database_inline),
   
TABLE_STRATEGY(TYPE=standard,SHARDING_COLUMN=order_id,SHARDING_ALGORITHM=table_inline),
   GENERATED_KEY(COLUMN=id,GENERATED_KEY_ALGORITHM=snowflake_key_generator)
   );
   then report the error:ERROR 1235 (42000): This version of 
ShardingSphere-Proxy doesn't yet support this SQL. 'You have an error in your 
SQL syntax'。
   If I change the 4 step to the following referenced the document:
   CREATE SHARDING TABLE RULE t_order (
   DATANODES("ts_${0..3}.t_order_${0..3}"),
   
DATABASE_STRATEGY(TYPE=standard,SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME=inline,PROPERTIES("algorithm-expression"="ts_${user_id
 % 4}")))),
   
TABLE_STRATEGY(TYPE=standard,SHARDING_COLUMN=order_id,SHARDING_ALGORITHM=table_inline),
   GENERATED_KEY(COLUMN=id,GENERATED_KEY_ALGORITHM=snowflake_key_generator)
   );
   The error is also occured.
   


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