Skip to content
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

[feature][processing] Add a last_value function to the aggregate algorithm #42587

Merged
merged 3 commits into from
Mar 31, 2021

Conversation

nirvn
Copy link
Contributor

@nirvn nirvn commented Mar 31, 2021

Description

This PR adds a new last_value aggregation method to processing's aggregate algorithm. It's an handy method to have when the dataset being aggregated has a meaningful ordering.

image

@nirvn nirvn added Feature Processing Relating to QGIS Processing framework or individual Processing algorithms Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. labels Mar 31, 2021
@nirvn nirvn added this to the 3.20 (Feature) milestone Mar 31, 2021
@github-actions
Copy link

@nirvn
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

Copy link
Collaborator

@nyalldawson nyalldawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Can we get a test too please?

src/analysis/processing/qgsalgorithmaggregate.cpp Outdated Show resolved Hide resolved
@nirvn
Copy link
Contributor Author

nirvn commented Mar 31, 2021

@nyalldawson , I couldn't spot a test for the aggregate alg. the begin with. Since the header indicates you're the author I had assumed you thought the underlying aggregate functions were well tested 😉

@nyalldawson
Copy link
Collaborator

I just ported from python -- I didn't write this one.

Isn't there tests in the standard processing yml test files?

@nirvn
Copy link
Contributor Author

nirvn commented Mar 31, 2021

@nyalldawson , ohh, that's possible. I was looking for "native:aggregate", it's probably IDed as "qgis:aggregate".

@nirvn nirvn changed the title Processing last value [feature][processing] Add a last_value function to the aggregate algorithm Mar 31, 2021
@nirvn
Copy link
Contributor Author

nirvn commented Mar 31, 2021

@nyalldawson , test added which revealed a bug in the code, so as always, good suggestion.

@github-actions
Copy link

@nirvn
A documentation ticket has been opened at qgis/QGIS-Documentation#6623
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

@zacharlie zacharlie added the ChangelogHarvested This PR description has been harvested in the Changelog already. label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Feature Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants