Skip to content

refactor filters #8256

@clintropolis

Description

@clintropolis

Description

DimFilter has a lot of repeated code between different implementations due to everything having an extractionFn and soon, a filterTuning following #8209. See this comment, and this is semi-related to #8242 in that it is suggesting a path to remove extractionFn from DimFilter so coordination is probably required.

Additionally, I think DimFilter and Filter can be combined, I understand they exist as separate entities so that DimFilter could be a light-weight 'client' object that was unaware of selectors and such, but this doesn't seem necessary with the current design of things and there is a lot of redundant stuff going on here that could be improved.

Finally, there is some room for improvements in how tests are creating DimFilters, so static methods to create filters for testing so passing in null for extractionFn and filterTuning should be added to decouple tests from the json schema of filters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions