-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix aggregate function returns incorrect results #59000
Conversation
🪟 Windows buildsDownload Windows builds of this PR for testing. 🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. |
When the aggregate uses variables, we need to ensure that the cache key correctly considers the current value of ALL those variables. Otherwise we'll return incorrect results when an expression is re-evaluated after changing the variable value for the context. Fixes use of aggregate function with @symbol_label in legends. Fixes qgis#58221
7cc2880
to
7b88103
Compare
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-59000-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 7b88103128db0cc33c5718ad273ddf51cb192bf9,8c70a83935423fa9aac8ef37651b92de5192c128
# Push it to GitHub
git push --set-upstream origin backport-59000-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports Then, create a pull request where the |
When the aggregate uses variables, we need to ensure that the
cache key correctly considers the current value of ALL those
variables. Otherwise we'll return incorrect results when
an expression is re-evaluated after changing the variable
value for the context.
Fixes use of aggregate function with @symbol_label in legends.
Fixes #58221
(Possibly also fixes #58315, but untested)