You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "IcebergXTY (via GitHub)" <gi...@apache.org> on 2023/06/15 03:55:02 UTC

[GitHub] [shardingsphere] IcebergXTY commented on issue #26348: why return empty when just one conditon is empty

IcebergXTY commented on issue #26348:
URL: https://github.com/apache/shardingsphere/issues/26348#issuecomment-1592311600

   @RaigorJiang Of course, I push [here](https://github.com/IcebergXTY/shardingsphere-return-empty-demo).
   Just explain it, we set `actualDataNodes: ds_$->{0..1}.cost_item_order_detail_$->{0..999}`, but we may just use `ds_$->{0..1}.cost_item_order_detail_$->{0..10}`, so the number of tables in the database are 11 rather than 1000.
   We use `shop_code` to judge the actual sharding table and the user can add shop at any time so we need a large enough range like `$->{0..999}` .
   In this scenario shown in the demo, empty shardingcondition will lead to a whole route so it will try to execute sql on the all 1000 table and then throw a exception `Table 'cost_item_order_detail_11' doesn't exist`


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org