sdk: C++-ify aggregate funcs#435
Merged
malone-at-work merged 1 commit intomainfrom May 6, 2026
Merged
Conversation
62003b8 to
29430c2
Compare
29430c2 to
0f3be62
Compare
villagestevers
approved these changes
May 6, 2026
| using DeducedState = | ||
| std::remove_reference_t<std::tuple_element_t<0, Params>>; | ||
| static_assert(std::is_same_v<DeducedState, State>, | ||
| "clear: first parameter must be State& matching the " |
Member
There was a problem hiding this comment.
Params[0] is known to be a reference here only because of the templating of is_agg_result_for_state, correct?
Member
Author
There was a problem hiding this comment.
Yes - that type checking was already done in make_aggregate_func. If we pulled more (e.g. add and clear) up into the the make... builder into the make signature, we would get better type checking. But this was the minimal change for now.
| } | ||
|
|
||
| // make_func<&impl>("name") | ||
| // TODO(villagesql-beta): remove the vef_vdf_func_t exception below once all |
Member
There was a problem hiding this comment.
You might want to open an issue to track the cleanup of these new todos.
Member
Author
There was a problem hiding this comment.
I consider them covered by issue #430. Should we consider allowing TODO(villagesql-#issue_number)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces
make_aggregate_func<>builder to create aggregate functions using C++ native types.The old code is not yet removed, until we clean up vsql-cube.