Skip to content

NotStartsWith residual evaluation always returns false #3496

@kevinjqliu

Description

@kevinjqliu

ResidualVisitor.visit_not_starts_with appears to always return AlwaysFalse() for partitioned residuals because it applies Python not to the AlwaysTrue() / AlwaysFalse() object returned by visit_starts_with.

Example with an identity partition:

partition value: x_part = "bb"
filter: NotStartsWith("x", "a")
actual residual: AlwaysFalse()
expected residual: AlwaysTrue()

This can attach an incorrect residual to planned scan tasks.

Relevant code: pyiceberg/expressions/visitors.py ResidualVisitor.visit_not_starts_with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions