d378971067 opened a new issue, #16576: URL: https://github.com/apache/doris/issues/16576
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues. ### Version 1.2.1 ### What's Wrong? cross join 加上order by跟limit 总数不对  ### What You Expected? cross join 有order by 跟limit的情况查询能够正常 0.15的版本就是正常的  ### How to Reproduce? 建表 `CREATE TABLE `tbl12` ( `dt` int(11) NULL, `org_id` int(11) NULL ) ENGINE=OLAP AGGREGATE KEY(`dt`, `org_id`) COMMENT 'OLAP' DISTRIBUTED BY HASH(`org_id`) BUCKETS 10 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2", "disable_auto_compaction" = "false" );` 插入数据 insert into tbl12 values(20211208, 21392),(20211209, 2140),(20211210, 2141),(20211211, 2142),(20211212, 21349),(20211213, 24139),(20211214, 42139),(20211215, 22139),(20211216, 21319),(20211217, 21339),(20211218, 21439),(20211219, 21239),(20231208, 21392),(20231209, 2140),(20231210, 2141),(20231211, 2142),(20231212, 21349),(20231213, 24139),(20231214, 42139),(20231215, 22139),(20231216, 21319),(20231217, 21339),(20231218, 21439),(20231219, 21239); 不分页查询结果正常,总条数为100条 SELECT * FROM ( SELECT dt FROM tbl12 GROUP BY dt ORDER BY dt ASC LIMIT 0, 10 ) a CROSS JOIN ( SELECT org_id FROM tbl12 GROUP BY org_id ORDER BY org_id ASC LIMIT 0, 10 )b; 分页查询结果出错,总条数应该是100条,但是查出来是50条 SELECT * FROM ( SELECT dt FROM tbl12 GROUP BY dt ORDER BY dt ASC LIMIT 0, 10 ) a CROSS JOIN ( SELECT org_id FROM tbl12 GROUP BY org_id ORDER BY org_id ASC LIMIT 5, 10 )b ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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: commits-unsubscr...@doris.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org