fix: 无GROUP BY聚合查询结果为空 — 跳过重复列投影
This commit is contained in:
Vendored
+1
-1
@@ -1458,7 +1458,7 @@ class QueryExecutor {
|
||||
const offset = stmt.offset ?? 0;
|
||||
const limit = stmt.limit ?? rows.length;
|
||||
rows = rows.slice(offset, offset + limit);
|
||||
if (!hasGroupBy && stmt.columns.length > 0 && stmt.columns[0] !== '*') {
|
||||
if (!hasGroupBy && !hasAggregate && stmt.columns.length > 0 && stmt.columns[0] !== '*') {
|
||||
rows = rows.map((row) => projectColumns(row, stmt.columns));
|
||||
}
|
||||
return rows;
|
||||
|
||||
Reference in New Issue
Block a user