Skip to content

Bug: Incorrect validation logic in plotting.max_rows config option #2255

Description

@RohithPariki

Description

There is a logic error in the validation function for the plotting.max_rows configuration option that prevents proper validation of negative values.

Location

File: databricks/koalas/config.py
Line: 201

Current Code

Option(
    key="plotting.max_rows",
    doc=(
        "'plotting.max_rows' sets the visual limit on top-n-based plots such as `plot.bar` "
        "and `plot.pie`. If it is set to 1000, the first 1000 data points will be used "
        "for plotting. Default is 1000."
    ),
    default=1000,
    types=int,
    check_func=(
        lambda v: v is v >= 0,  # ← BUG HERE
        "'plotting.max_rows' should be greater than or equal to 0.",
    ),
),

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