Skip to content

Commit

Permalink
fix typo in cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Oct 16, 2020
1 parent e1319a1 commit 0170436
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionfunction.cpp
Expand Up @@ -907,7 +907,7 @@ static QVariant fcnAggregateGeneric( QgsAggregateCalculator::Aggregate aggregate
QString cacheKey;
if ( !isStatic )
{
cacheKey = QStringLiteral( "aggfcn:%1:%2:%3:%4:%5%6:%7" ).arg( vl->id(), QString::number( aggregate ), subExpression, parameters.filter,
cacheKey = QStringLiteral( "agg:%1:%2:%3:%4:%5%6:%7" ).arg( vl->id(), QString::number( aggregate ), subExpression, parameters.filter,
QString::number( context->feature().id() ), QString( qHash( context->feature() ) ), orderBy );
}
else
Expand Down
4 changes: 2 additions & 2 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -2048,8 +2048,8 @@ class TestQgsExpression: public QObject

// also test for generic aggregates
exp = QString( "with_variable('my_var',\"col1\", sum(expression:=\"col1\", filter:=\"col1\"=@my_var))" );
res = exp.evaluate( &context ).toInt();
QCOMPARE( res, f.attribute( "col1" ).toInt() );
int res2 = exp.evaluate( &context ).toInt();
QCOMPARE( res2, f.attribute( "col1" ).toInt() );
}
}

Expand Down

0 comments on commit 0170436

Please sign in to comment.