fix: 无GROUP BY聚合查询结果为空 — 跳过重复列投影
CI / test (18.x) (push) Successful in 9m56s
CI / test (20.x) (push) Successful in 9m52s
CI / test (22.x) (push) Successful in 9m49s
CI / test (24.x) (push) Successful in 10m0s

This commit is contained in:
thzxx
2026-07-26 17:46:14 +08:00
parent 5068cd0409
commit 382e1b24fe
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1460,7 +1460,7 @@
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;