Skip to content

When multiple filters selected in arg_tags_filter, each filter works as 'or' instead of 'and'. #10724

@oboki

Description

@oboki

Description

When I selected multiple filters, it seemed that the tag filter didn't work as I thought. so I checked the query and found that the query uses in clause.

SELECT dag.dag_id AS dag_dag_id, dag.root_dag_id AS dag_root_dag_id, dag.is_paused AS dag_is_paused, dag.is_subdag AS dag_is_subdag, dag.is_active AS dag_is_active, dag.last_scheduler_run AS dag_last_scheduler_run, dag.last_pickled AS dag_last_pickled, dag.last_expired AS dag_last_expired, dag.scheduler_lock AS dag_scheduler_lock, dag.pickle_id AS dag_pickle_id, dag.fileloc AS dag_fileloc, dag.owners AS dag_owners, dag.description AS dag_description, dag.default_view AS dag_default_view, dag.schedule_interval AS dag_schedule_interval 
FROM dag 
WHERE dag.is_subdag = 0 AND dag.is_active = 1 AND (EXISTS (SELECT 1 
FROM dag_tag 
WHERE dag.dag_id = dag_tag.dag_id AND dag_tag.name IN (%s, %s)))

Use case / motivation

I want this filter to work with the 'and' condition. and I think 'and' condition is more familiar with the filter function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:UIRelated to UI/UX. For Frontend Developers.kind:featureFeature Requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions