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

Correctly override node in aggregateBinaryExpr #689

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

jacksontj
Copy link
Owner

In #676 we added support for query push down for BinaryExp where it is a literal and either a VectorSelector or a subset of AggregateExprs. However this initial implementation introduced a bug for AggregateExprs. Specifically it was doing the query push down but not doing the node replace properly -- such that the literal operation was done twice (e.g. add twice, multiply twice, etc.).

This patch will have the aggregateBinaryExpr replace the Binary Expr (i.e. (max(foo) * 100) ) with the "filled in" AggregateExpr -- such that the re-execution of the aggregation still occurs without re-doing the literal calculation.

Fixes #688

In #676 we added support for query push down for BinaryExp where it is a
literal and either a VectorSelector or a subset of AggregateExprs.
However this initial implementation introduced a bug for AggregateExprs.
Specifically it was doing the query push down but not doing the node
replace properly -- such that the literal operation was done twice (e.g.
add twice, multiply twice, etc.).

This patch will have the aggregateBinaryExpr replace the Binary Expr
(i.e. `(max(foo) * 100)` ) with the "filled in" AggregateExpr -- such
that the re-execution of the aggregation still occurs without re-doing
the literal calculation.

Fixes #688
@jacksontj jacksontj merged commit 127fb5b into master Nov 1, 2024
1 check passed
@jacksontj jacksontj deleted the issue_688 branch November 1, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calculation wrong when sent through promxy
1 participant