Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CTable boolean filtering is incorrect when the predicate is built from a sliced column view #607

Description

@FrancescAlted

The comparison is evaluated against the full underlying column instead of the slice’s valid-row mask, so where() can include rows that are outside the sliced view.

Minimal repro: create a table with ids [0, 1, 2, 3, 4, 5], take view = table.row[1:4] so the view contains [1, 2, 3], then run view.where(view.id[0:2] > 1). The expected result is [2], because the predicate only applies to the sliced subcolumn [1, 2], but the actual result includes an extra row from outside that slice. See attached script.

bool-sliced-cols.py

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions