Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1601

DateRangeRules loses OR filters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.11.0
    • 1.12.0
    • core
    • None

    Description

      I'm not sure why, but DateRangeRules can lose some filters. For example in this query:

      SELECT COUNT(*) FROM druid.foo WHERE EXTRACT(YEAR FROM __time) = 2000 AND EXTRACT(MONTH FROM __time) IN (2, 3, 5)
      

      The filter gets resolved to __time >= 2000-02-01 and __time < 2000-03-01, losing the months "3" and "5". Removing DateRangeRules.FILTER_INSTANCE from the planner's rule set stops this from happening.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            gian Gian Merlino
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: