1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

New test cases. Fix the logic so that it works for GROUP BY aggregates

that do not require sorting.

FossilOrigin-Name: ef6ebe7922f56c1584a005deedc85ca1070b4fe5082ada8bbf8d06df54f1c9ef
This commit is contained in:
drh
2022-11-24 13:19:25 +00:00
parent 4b1555a9fc
commit b669bb5e2b
4 changed files with 98 additions and 8 deletions

View File

@@ -4145,6 +4145,11 @@ expr_code_doover:
}
}
return target;
}else if( pExpr->y.pTab==0 ){
/* This case happens when the argument to an aggregate function
** is rewritten by aggregateConvertIndexedExprRefToColumn() */
sqlite3VdbeAddOp3(v, OP_Column, pExpr->iTable, pExpr->iColumn, target);
return target;
}
/* Otherwise, fall thru into the TK_COLUMN case */
/* no break */ deliberate_fall_through