Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow values of any type in GroupFilter.group #14034

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

mattpap
Copy link
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
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
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
21 of 22 checks passed
@mattpap mattpap deleted the mattpap/7524_GroupFilter_value_type branch August 21, 2024 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GroupFilter only accepts strings
2 participants