Skip to content

Commit

Permalink
fix: bivariate semi-aggregates (linRegrPredicted, linRegrResidual) re…
Browse files Browse the repository at this point in the history
…spect filter argument
  • Loading branch information
kswenson committed Nov 15, 2024
1 parent 46b4470 commit 877390c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v3/src/models/formula/functions/bivariate-stats-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ function evaluateRawLinearRegressionSemiAggregate(fn: (lsr: ValidLSRResult, x: n
scope.withLocalContext(() => {
const [xIsValid, x] = checkNumber(evaluateNode(xArg, scope))
const [yIsValid, y] = checkNumber(evaluateNode(yArg, scope))
if (xIsValid && yIsValid) {
const filterValue = filterArg ? evaluateNode(filterArg, scope) : true
if (xIsValid && yIsValid && isValueTruthy(filterValue)) {
result = fn(lsrResult, x, y)
}
})
Expand Down

0 comments on commit 877390c

Please sign in to comment.