strongduanmu opened a new issue, #21594: URL: https://github.com/apache/shardingsphere/issues/21594
## Bug Report ### Which version of ShardingSphere did you use? https://github.com/apache/shardingsphere/commit/155b86e7ff8d7b247e0261c2b9135059bb12ccca ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior SQL rewrite successfully. ### Actual behavior  ### Reason analyze (If you can)  The TableTokenGenerator class determines whether the logical table name and the actual table name are consistent, and skips the rewriting if they are consistent, while the binding table is rewritten depending on the primary table, which will cause other tables in the binding table to be unable to be rewritten and an execution error will occur. ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. ```sql CREATE SHARDING TABLE RULE t_order ( DATANODES("ds_${0..4}.t_order"), DATABASE_STRATEGY(TYPE=standard,SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME=inline,PROPERTIES("algorithm-expression"="ds_${order_id % 5}")))) ); CREATE SHARDING TABLE RULE t_order_item ( DATANODES("ds_${0..4}.t_order_item_test"), DATABASE_STRATEGY(TYPE='standard',SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME='inline',PROPERTIES("algorithm-expression"="ds_${order_id% 5}")))), ); ``` Then execute `select * from t_order o inner join t_order_item i on o.order_id = i.order_id where o.order_id = 1` ### Example codes for reproduce this issue (such as a github link). -- 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]
