New aggregates last minus first
and high minus low
#1742
Merged
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 PR is a rebased, modified and tested version of #1739. The major changes:
Xn - X0
for these aggregate types used the double-promotingoperator
implementations fort_tscalar
, (which is required by ExprTK), however the output column type for these aggregates was not promoted, leading to all 0/null
values. This PR adds a new set of type-preserving methodsadd_typesafe
andsub_typesafe
that can be used safely with the new aggregates.first_last_helper
method was being called twice, when internally this method does a column-scan and calculates both values for each pass. This PR modifies the signature offirst_last_helper
to just return the tuple which can be decomposed by the caller, eliminating the extraneous iteration. This aggregate should really use thebuild_aggregate<>
pattern likeAGGTYPE_HIGH_WATER_MARK
does currently...gitignore
changes.