Drop datapoints where the corresponding value in the second series set is non-zero. (See Series Operations for what corresponding means).
The name of the function suggests that the described behaviour is the intended one, but the behaviour is inconsistent with the documentation.
Currently, the points are *kept( (rather than dropped) where the corresponding value in the second series set is non-zero.
We should update the documentation to describe the actual behaviour and consider a breaking change that gives the function the desired (and from the name more intuitive behaviour) in a future version.
Steps to reproduce
Run the following query: dropbool(series("foo=bar", 0, 1, 1, 1, 2, 1, 3, 1), series("", 0, 1, 1, 2, 2, 3, 3, 2) != 2)
Observe the output: {"0": 1, "2": 1} - expected is {"1": 1, "3": 1} with the current documentation.
Context
The documentation for
dropbool()
currently statesThe name of the function suggests that the described behaviour is the intended one, but the behaviour is inconsistent with the documentation. Currently, the points are *kept( (rather than dropped) where the corresponding value in the second series set is non-zero.
We should update the documentation to describe the actual behaviour and consider a breaking change that gives the function the desired (and from the name more intuitive behaviour) in a future version.
Steps to reproduce
dropbool(series("foo=bar", 0, 1, 1, 1, 2, 1, 3, 1), series("", 0, 1, 1, 2, 2, 3, 3, 2) != 2)
{"0": 1, "2": 1}
- expected is{"1": 1, "3": 1}
with the current documentation.