Fixed the Pagination missing when using SELECT DISTINCT (#18493)

Signed-off-by: Sachin Bahukhandi <sachinb0013@gmail.com>
This commit is contained in:
Sachin Bahukhandi 2023-07-13 23:39:06 +05:30 committed by GitHub
parent daa252ba42
commit 73efd6e03e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -701,7 +701,7 @@ class Sql
$statement->limit = false;
}
if (! $statementInfo->isGroup && count($statement->expr) === 1) {
if (! $statementInfo->isGroup && ! $statementInfo->distinct && count($statement->expr) === 1) {
$statement->expr[0] = new Expression();
$statement->expr[0]->expr = '1';
}