Skip to content

Commit

Permalink
Rename: NullsView to BoolView
Browse files Browse the repository at this point in the history
Rename NullsView to BoolView since this can be used for creating views
of Bool vectors as well. In addition have all an false value views of
a boolean vector return a non-nil vector. When dealing with boolean values
there's a difference between a false values and a nil vector.

Also have NewView of a boolean vector create a new boolean vector.
  • Loading branch information
mattnibs committed Nov 22, 2024
1 parent 98f94ff commit 6d9344f
Show file tree
Hide file tree
Showing 9 changed files with 265 additions and 502 deletions.
4 changes: 3 additions & 1 deletion runtime/vam/expr/arith.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ func (a *Arith) eval(vecs ...vector.Any) (out vector.Any) {
}
}()
}
return f(lhs, rhs)
out = f(lhs, rhs)
vector.SetNulls(out, vector.Or(vector.NullsOf(lhs), vector.NullsOf(rhs)))
return out
}

func (a *Arith) evalDivideByZero(kind vector.Kind, lhs, rhs vector.Any) vector.Any {
Expand Down
Loading

0 comments on commit 6d9344f

Please sign in to comment.