You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful (as identified today for work towards the VISION project, context summary below) to be able to query on, not just a closed interval for a 'within a range' (wi) query, i.e. inclusive of the given endpoints, as is the only option at present, but an open (exclusive of the endpoints) and a half-open (inclusive on one side, for either side) condition.
but depending on context someone might want the evaluation results here to be (T, F, F), (T, T, F), or (T, F, T) instead. And equivalently for a without (wo) query.
This could be achieved with a compound query but it would be nicer to provide an interface to do this in one single query.
FYI the use case we had for our VISION project work, this would be especially handy for cases where querying is being done piecewise across a contiguous sequence, because with a closed interval there is double counting of the endpoints inside it.
Implementation proposal
As discussed today, the simplest and tentatively agreed way to implement this is via a pair of new keywords which enable the start and end of the interval, the lower and upper bound, to become open instead of closed. This would look to the user like so, where I am proposing the names open_lower and open_upper (but perhaps open0 and open1 could work also to match the value0 and value1 argument names) for those kwargs:
These kwargs would also be added to wo for the equivalent (half-)open queries.(see below)
Update: we've decided not to apply these to "wo" queries as well as "wi" queries, because in that context it would be quite confusing due to the inversion of the statement relative to "wi" - see #753 (comment).
The text was updated successfully, but these errors were encountered:
sadielbartholomew
changed the title
Support (half)-open intervals for wi and wo query endpoints
Support (half)-open intervals for wi query endpoints
Mar 27, 2024
It would be useful (as identified today for work towards the VISION project, context summary below) to be able to query on, not just a closed interval for a 'within a range' (
wi
) query, i.e. inclusive of the given endpoints, as is the only option at present, but an open (exclusive of the endpoints) and a half-open (inclusive on one side, for either side) condition.To demonstrate, the behaviour of
wi
is:but depending on context someone might want the evaluation results here to be
(T, F, F)
,(T, T, F)
, or(T, F, T)
instead. And equivalently for a without (wo
) query.This could be achieved with a compound query but it would be nicer to provide an interface to do this in one single query.
FYI the use case we had for our VISION project work, this would be especially handy for cases where querying is being done piecewise across a contiguous sequence, because with a closed interval there is double counting of the endpoints inside it.
Implementation proposal
As discussed today, the simplest and tentatively agreed way to implement this is via a pair of new keywords which enable the start and end of the interval, the lower and upper bound, to become
open
instead ofclosed
. This would look to the user like so, where I am proposing the namesopen_lower
andopen_upper
(but perhapsopen0
andopen1
could work also to match thevalue0
andvalue1
argument names) for those kwargs:These kwargs would also be added to(see below)wo
for the equivalent (half-)open queries.Update: we've decided not to apply these to "wo" queries as well as "wi" queries, because in that context it would be quite confusing due to the inversion of the statement relative to "wi" - see #753 (comment).
The text was updated successfully, but these errors were encountered: