首页 > 其他分享 >sharding 的遇到的相关坑

sharding 的遇到的相关坑

时间:2022-10-09 12:04:26浏览次数:48  
标签:SQLParsingUnsupportedException 遇到 distinct 支持 问题 sql sharding 相关


org.springframework.dao.InvalidDataAccessApiUsageException: Can't find index: AggregationSelectItem

  这个问题是用 sharding ,要对聚合函数起一个别名。 看官网给的解释:

sharding 的遇到的相关坑_聚合函数

 

 

 第二个问题:

io.shardingsphere.core.parsing.parser.exception.SQLParsingUnsupportedException: Not supported token 'DISTINCT'.

  这个问题,其实就是 sharding 不支持 distinct ,其实官网上说是支持下边图上的 distinct 的相关sql,但是因为的我的sql 后边是带了 where 条件查询的,所以不支持了。

sharding 的遇到的相关坑_sql_02

   对于这个问题,如果不支持,那也没办法,就只在程序里边做去重。 

 

标签:SQLParsingUnsupportedException,遇到,distinct,支持,问题,sql,sharding,相关
From: https://blog.51cto.com/u_15812686/5740078

相关文章