1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Enhance the sqlite3ExprCompare() routine so that it knows to compare the

OVER clause of window functions.

FossilOrigin-Name: 0a7649afebc9349bf44a0e3588e81ab595ea85be1c70de08859ea76a7b271f62
This commit is contained in:
drh
2018-07-10 06:47:07 +00:00
parent a1fd4b520b
commit 6cbb4c936c
3 changed files with 15 additions and 7 deletions

View File

@@ -4951,6 +4951,14 @@ int sqlite3ExprCompare(Parse *pParse, Expr *pA, Expr *pB, int iTab){
if( pA->iTable!=pB->iTable
&& (pA->iTable!=iTab || NEVER(pB->iTable>=0)) ) return 2;
}
#ifndef SQLITE_OMIT_WINDOWFUNC
if( pA->pWin!=0 ){
if( pB->pWin==0 ) return 2;
if( sqlite3WindowCompare(pParse,pA->pWin,pB->pWin)!=0 ) return 2;
}else if( pB->pWin!=0 ){
return 2;
}
#endif
}
return 0;
}