Skip to content

Allow values of any type in GroupFilter.group#14034

Merged
mattpap merged 1 commit into
branch-3.6from
mattpap/7524_GroupFilter_value_type
Aug 21, 2024
Merged

Allow values of any type in GroupFilter.group#14034
mattpap merged 1 commit into
branch-3.6from
mattpap/7524_GroupFilter_value_type

Conversation

@mattpap
Copy link
Copy Markdown
Contributor

@mattpap mattpap commented Aug 21, 2024

Also switches from using === for value equality to is_equals(), which allows handling of NaN, arrays and other complex or unusual types. Performance hit should be minimal for primitives, because is_equal() has hot paths for these. In the future, this will also allow us to implement inexact equality for floats.

fixes #7524

@mattpap mattpap added this to the 3.6 milestone Aug 21, 2024
@bryevdv
Copy link
Copy Markdown
Member

bryevdv commented Aug 21, 2024

The docsctring for GroupFilter needs updating:

A GroupFilter represents the rows of a ColumnDataSource where the values of the categorical
column column_name match the group variable.

since the usage is no longer confined to categorical columns

Copy link
Copy Markdown
Member

@bryevdv bryevdv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment about the docstring update

Also switches from using === for value equality to is_equals(),
which allows handling of NaN, arrays and other complex types.
@mattpap mattpap force-pushed the mattpap/7524_GroupFilter_value_type branch from 8caf2c9 to a3f28fb Compare August 21, 2024 20:07
@mattpap mattpap merged commit a73f0bd into branch-3.6 Aug 21, 2024
@mattpap mattpap deleted the mattpap/7524_GroupFilter_value_type branch August 21, 2024 20:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 4, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GroupFilter only accepts strings

2 participants