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/06/01 07:49:57 UTC
[GitHub] [shardingsphere] childewuque opened a new issue #10597: complex sql sharding,only one table is hint sharding
childewuque opened a new issue #10597:
URL: https://github.com/apache/shardingsphere/issues/10597
shardingsphere 5.0.0-RC1 (master)
There are two tables in a sql, but only one is sharding (hint sharding). Only sharding of that table is configured, but hint sharding is not executed.
1st sql: select a.name from a,b where a.id= b.id and b.buyid=20 and b.sellerid=100
table a is sharding,table b is a single table
yaml config:
...
tables:
td_coupon_buyer:
actual-data-nodes: db.a$->{0..255}
tableStrategy:
hint:
shardingAlgorithmName: table-class-based-hint
sharding-algorithms:
table-class-based-hint:
type: CLASS_BASED
props:
strategy: hint
algorithmClassName: com.a.TableHintAlgorithm
But it can run in hint sharding code when using the below sql:
2nd sql:select a.name from a order by id limit 10
Then I debug code :
1st sql ,it will come in ShardingFederatedRoutingEngine
2nd sql ,it will come in ShardingStandardRoutingEngine
ShardingFederatedRoutingEngine does not contain hint invoking.But ShardingStandardRoutingEngine has hint invoking
So, is my config error? Thanks
--
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] RaigorJiang closed issue #10597: complex sql sharding,only one table is hint sharding
Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #10597:
URL: https://github.com/apache/shardingsphere/issues/10597
--
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
[GitHub] [shardingsphere] RaigorJiang closed issue #10597: complex sql sharding,only one table is hint sharding
Posted by GitBox <gi...@apache.org>.
RaigorJiang closed issue #10597:
URL: https://github.com/apache/shardingsphere/issues/10597
--
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
[GitHub] [shardingsphere] childewuque commented on issue #10597: complex sql sharding,only one table is hint sharding
Posted by GitBox <gi...@apache.org>.
childewuque commented on issue #10597:
URL: https://github.com/apache/shardingsphere/issues/10597#issuecomment-851928639
Let's configure table B as a broadcast table?
format right?
spring.shardingsphere.sharding.broadcast-tables=b
--
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] childewuque commented on issue #10597: complex sql sharding,only one table is hint sharding
Posted by GitBox <gi...@apache.org>.
childewuque commented on issue #10597:
URL: https://github.com/apache/shardingsphere/issues/10597#issuecomment-851954569
This is right for the case.please close the issue,thanks.
spring:
shardingsphere:
rules:
sharding:
broadcast-tables: b
--
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