CheerwayRen edited a comment on issue #8038: URL: https://github.com/apache/shardingsphere/issues/8038#issuecomment-855745775
@kimmking @strongduanmu We have the same problem with the same version,when using left join and order by  mng_sale_amount_month is common table , mng_sale_amount_day is a sharding table!  sql is: SELECT msam.MALL_ID as mallId FROM mng_sale_amount_month msam LEFT JOIN mng_sale_amount_day msad ON msad.MONTH_ID = msam.ID WHERE msad.SALE_YMD in ('20201202','20210101') order by msam.MALL_ID; table mng_sale_amount_month scheme: -- ---------------------------- DROP TABLE IF EXISTS `mng_sale_amount_month`; CREATE TABLE `mng_sale_amount_month` ( `ID` bigint NOT NULL, `MALL_ID` bigint NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; table mng_sale_amount_dayscheme: -- ---------------------------- DROP TABLE IF EXISTS `mng_sale_amount_day`; CREATE TABLE `mng_sale_amount_day` ( `ID` bigint NOT NULL COMMENT '主键', `MONTH_ID` bigint DEFAULT NULL COMMENT '月销售额ID', `SALE_YMD` varchar(8) DEFAULT NULL COMMENT '年月日' )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; sharding rule is by SALE_YMD Please take a look. If you need any other information, please contact me -- 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]
