mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix a problem with window functions in aggregate queries that do not have GROUP BY clauses.
FossilOrigin-Name: 99609786f485653464d1caef1d207ae299d28c925bff3e8e94891759b4765dcc
This commit is contained in:
@@ -799,6 +799,7 @@ static int selectWindowRewriteExprCb(Walker *pWalker, Expr *pExpr){
|
||||
}
|
||||
if( iCol<0 ){
|
||||
Expr *pDup = sqlite3ExprDup(pParse->db, pExpr, 0);
|
||||
if( pDup && pDup->op==TK_AGG_FUNCTION ) pDup->op = TK_FUNCTION;
|
||||
p->pSub = sqlite3ExprListAppend(pParse, p->pSub, pDup);
|
||||
}
|
||||
if( p->pSub ){
|
||||
|
Reference in New Issue
Block a user