seowen808 opened a new issue #7050:
URL: https://github.com/apache/shardingsphere/issues/7050
用springBoot2.3+mybatis+mysql8 集成sharding 4.1.1,
使用读写分离+分片。当sql语句中 有 group by 时,就会分片失败,无法路由到具体的物理表。 去掉 group
by后。就可以路由到具体表,并执行成功.
SpringBoot2.3 +mybatis+mysql8 integration sharding 4.1.1,
Use read/write separation + sharding.When there is Group BY in the SQL
statement, sharding fails and cannot be routed to a specific physical
table.After removing Group BY.You can route to a specific table and execute
successfully.
springboot yaml 配置如下:

**核心代码(带gruop by)如下:**

执行的输出日志如下(无法路由到consumer_link_8和 consumer_link_9):

**核心代码(不带gruop by)如下:**

执行的输出日志如下(成功路由到consumer_link_8和 consumer_link_9):

----------------------------------------------------------------
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:
[email protected]