mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Return an error if DISTINCT is used with a window-function (.i.e.
"count(DISTINCT <expr>) OVER (...)". FossilOrigin-Name: d59bcc8eea4fcf0ee3c2263d31ee42f9f26c28434d2f0045f2d3329f18791d1c
This commit is contained in:
@@ -867,8 +867,13 @@ Window *sqlite3WindowAlloc(
|
||||
*/
|
||||
void sqlite3WindowAttach(Parse *pParse, Expr *p, Window *pWin){
|
||||
if( p ){
|
||||
p->pWin = pWin;
|
||||
if( pWin ) pWin->pOwner = p;
|
||||
if( pWin ){
|
||||
p->pWin = pWin;
|
||||
pWin->pOwner = p;
|
||||
if( p->flags & EP_Distinct ){
|
||||
sqlite3ErrorMsg(pParse,"DISTINCT is not supported for window functions");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
sqlite3WindowDelete(pParse->db, pWin);
|
||||
}
|
||||
|
Reference in New Issue
Block a user