Lines Matching defs:pSubq
143192 ** pSubq, which contains at least one window function. Return 1
143207 static int pushDownWindowCheck(Parse *pParse, Select *pSubq, Expr *pExpr){
143208 assert( pSubq->pWin->pPartition );
143209 assert( (pSubq->selFlags & SF_MultiPart)==0 );
143210 assert( pSubq->pPrior==0 );
143211 return sqlite3ExprIsConstantOrGroupBy(pParse, pExpr, pSubq->pWin->pPartition);
143294 Select *pSubq, /* The subquery whose WHERE clause is to be augmented */
143301 if( pSubq->selFlags & (SF_Recursive|SF_MultiPart) ) return 0;
143305 if( pSubq->pPrior ){
143307 for(pSel=pSubq; pSel; pSel=pSel->pPrior){
143315 if( pSubq->pWin && pSubq->pWin->pPartition==0 ) return 0;
143326 for(pX=pSubq; pX; pX=pX->pPrior){
143332 if( pSubq->pLimit!=0 ){
143336 nChng += pushDownWhereTerms(pParse, pSubq, pWhere->pRight, pSrc);
143356 pSubq->selFlags |= SF_PushDown;
143357 while( pSubq ){
143365 x.pEList = pSubq->pEList;
143366 x.pCList = findLeftmostExprlist(pSubq);
143369 if( pSubq->pWin && 0==pushDownWindowCheck(pParse, pSubq, pNew) ){
143376 if( pSubq->selFlags & SF_Aggregate ){
143377 pSubq->pHaving = sqlite3ExprAnd(pParse, pSubq->pHaving, pNew);
143379 pSubq->pWhere = sqlite3ExprAnd(pParse, pSubq->pWhere, pNew);
143381 pSubq = pSubq->pPrior;