aboutsummaryrefslogtreecommitdiff
path: root/src/treeview.c
diff options
context:
space:
mode:
authordrh <>2023-10-19 01:26:34 +0000
committerdrh <>2023-10-19 01:26:34 +0000
commitd9451051f1f0e7263db0907da78d07b0f69cdbee (patch)
tree2406f4dd76e18f3a14a0cc61a6c8455d6040dd51 /src/treeview.c
parent69ff726d4d82eb070f798f854472b21518627c59 (diff)
parent0b633640fa1bb3f078cca636647a865b3fa30734 (diff)
downloadsqlite-d9451051f1f0e7263db0907da78d07b0f69cdbee.tar.gz
sqlite-d9451051f1f0e7263db0907da78d07b0f69cdbee.zip
Add support for ORDER BY on the argument list of aggregate functions.
FossilOrigin-Name: 634286828dad873dba244751441aa729cd37b6ed5899fa5875643d4af03c006c
Diffstat (limited to 'src/treeview.c')
-rw-r--r--src/treeview.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/treeview.c b/src/treeview.c
index d55adab38..6852a61dd 100644
--- a/src/treeview.c
+++ b/src/treeview.c
@@ -709,6 +709,12 @@ void sqlite3TreeViewExpr(TreeView *pView, const Expr *pExpr, u8 moreToFollow){
}
if( pFarg ){
sqlite3TreeViewExprList(pView, pFarg, pWin!=0, 0);
+ if( pExpr->pLeft ){
+ Expr *pOB = pExpr->pLeft;
+ assert( pOB->op==TK_ORDER );
+ assert( ExprUseXList(pOB) );
+ sqlite3TreeViewExprList(pView, pOB->x.pList, pWin!=0, "ORDERBY");
+ }
}
#ifndef SQLITE_OMIT_WINDOWFUNC
if( pWin ){