Skip to content
Permalink
Browse files

fix typo in cache key

  • Loading branch information
3nids authored and nyalldawson committed Oct 16, 2020
1 parent e1319a1 commit 0170436d761eaf741af90221bb6862fde3bb0a10
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/core/expression/qgsexpressionfunction.cpp
  2. +2 −2 tests/src/core/testqgsexpression.cpp
@@ -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
@@ -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() );
}
}

0 comments on commit 0170436

Please sign in to comment.
You can’t perform that action at this time.