Skip to content

6.1.0rc1 - Empty filters generating unnecessary WHERE clauses on Chart's queries #38701

Closed

Description

@luizotavio32

Bug description

Chart's queries are being generated with a unnecessary WHERE 1 = 1 clause when there's an empty time filter assigned to the chart. In some DB engines this clause gets generated as WHERE TRUE = 1 what leads the chart to error out.

Screenshots/recordings

Image Image

Superset version

6.0.0

Python version

3.10

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    explore:filterRelated to filters in Explorevalidation:requiredA committer should validate the issue

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions