diff options
author | drh <> | 2023-10-19 01:26:34 +0000 |
---|---|---|
committer | drh <> | 2023-10-19 01:26:34 +0000 |
commit | d9451051f1f0e7263db0907da78d07b0f69cdbee (patch) | |
tree | 2406f4dd76e18f3a14a0cc61a6c8455d6040dd51 /src/treeview.c | |
parent | 69ff726d4d82eb070f798f854472b21518627c59 (diff) | |
parent | 0b633640fa1bb3f078cca636647a865b3fa30734 (diff) | |
download | sqlite-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.c | 6 |
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 ){ |