Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-27286

Implement WITH FILL to GROUP BY

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      There are a lot of cases when GROUP BY does not handle "blanks" in (for example) dates.

      There should be an option to fetch data with zeros in GROUP BY:

      SELECT EventDate, count() FROM test.hits WHERE CounterID = 2841673 GROUP BY EventDate
      ORDER BY EventDate WITH FILL STEP 1
       
      ┌──EventDate─┬─count()─┐
      │ 2014-03-17 │       3 │
      │ 2014-03-18 │       0 │
      │ 2014-03-19 │       6 │
      │ 2014-03-20 │       0 │
      │ 2014-03-21 │       7 │
      │ 2014-03-22 │       6 │
      └────────────┴─────────┘
      

      Source: https://clickhouse.com/blog/en/2021/clickhouse-v21.12-released/#support-for-interval-operator-inside-with-fill-modifier-for-order-by-clause
      New links: https://clickhouse.com/docs/en/whats-new/changelog/2021/
      And: https://github.com/ClickHouse/ClickHouse/pull/30927

      This is a very common use case when aggregating results.

      Attachments

        1. screenshot-1.png
          55 kB
          Antonio Fernandes
        2. image-2021-12-16-19-13-21-584.png
          50 kB
          Antonio Fernandes

        Activity

          People

            Unassigned Unassigned
            ampf Antonio Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.