diff options
author | drh <drh@noemail.net> | 2018-07-10 06:47:07 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-07-10 06:47:07 +0000 |
commit | 6cbb4c936c39acceb7a2181037f2d6e33badc32e (patch) | |
tree | cc0b9fb5a2f5f3d695bb0cc3ac935cbf792b4d68 /src/expr.c | |
parent | a1fd4b520b11d19f93be6f3cd9dca6137486c0d0 (diff) | |
download | sqlite-6cbb4c936c39acceb7a2181037f2d6e33badc32e.tar.gz sqlite-6cbb4c936c39acceb7a2181037f2d6e33badc32e.zip |
Enhance the sqlite3ExprCompare() routine so that it knows to compare the
OVER clause of window functions.
FossilOrigin-Name: 0a7649afebc9349bf44a0e3588e81ab595ea85be1c70de08859ea76a7b271f62
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c index 24d1cb410..10a1dc67f 100644 --- a/src/expr.c +++ b/src/expr.c @@ -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; } |