这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Bug: dropbool() documentation inconsistent with behaviour #2496

@muffix

Description

@muffix

Context

The documentation for dropbool() currently states

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

  1. 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)
  2. Observe the output: {"0": 1, "2": 1} - expected is {"1": 1, "3": 1} with the current documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions