1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Remove some bad assert() statements from the implementations of window

functions percent_rank() and cume_dist().

FossilOrigin-Name: 443f0c286f1659937fd61b4ef2de17d0d015369e5ff5249a9e0c3d0ee4925158
This commit is contained in:
dan
2018-07-06 13:25:02 +00:00
parent e33f6e7c91
commit cf0343b699
8 changed files with 48 additions and 29 deletions

View File

@@ -255,9 +255,8 @@ static void percent_rankStepFunc(
struct CallCount *p;
assert( nArg==1 );
assert( sqlite3VdbeAssertAggContext(pCtx) );
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( ALWAYS(p) ){
if( p ){
if( p->nTotal==0 ){
p->nTotal = sqlite3_value_int64(apArg[0]);
}
@@ -301,9 +300,8 @@ static void cume_distStepFunc(
struct CallCount *p;
assert( nArg==1 );
assert( sqlite3VdbeAssertAggContext(pCtx) );
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( ALWAYS(p) ){
if( p ){
if( p->nTotal==0 ){
p->nTotal = sqlite3_value_int64(apArg[0]);
}