superset icon indicating copy to clipboard operation
superset copied to clipboard

Filters not applied without granularity

Open andrewhn opened this issue 10 years ago • 1 comments

OS: Ubuntu 14.04.4 LTS Server Extra system info: Running caravel via a docker container To reproduce: Select "Sankey" chart with appropriate data, apply filter on filterable column, hit query, verify results are not filtered

It seems filters are only applied if a granularity is passed via the UI (see this line). For a Sankey diagram, there is no granularity option so the filters aren't being applied to the data. Perhaps this code could be changed to the following:

        if granularity:
            qry = qry.where(and_(*(time_filter + where_clause_and)))
        else:
            qry = qry.where(and_(*where_clause_and))

andrewhn avatar Apr 04 '16 09:04 andrewhn

closed with #258

andrewhn avatar Apr 05 '16 02:04 andrewhn