Skip to content

Druid 28.0.0 breaks the whole-query cache for groupBy queries with multiple post-aggregate metrics. #15393

Description

@hnakamor

I have been using Druid 28.0.0 and found a new bug.
The whole-query cache for groupBy queries with multiple post-aggregation metrics is broken.
However, if there are no post-aggregation metrics or a single post-aggregation metric, this bug does not seem to occur.

This bug is probably caused by a new feature in #11595.

Affected Version

Druid 28.0.0

Description

Below is a description of what happens when the bug occurs.

Settings changed from default settings

  • druid.broker.cache.useResultLevelCache=true
  • druid.broker.cache.populateResultLevelCache=true

Query

SELECT
  "channel","cityName"
  ,COUNT(*) AS a1
  ,COUNT(*) * 2 AS a2
  ,COUNT(*) * 3 AS a3
FROM "wikipedia"
WHERE TIME_IN_INTERVAL("__time", '2015-09-12T00:00:00.000Z/2015-09-13T00:00:00.000Z')
GROUP BY 1,2
ORDER BY 3 DESC
LIMIT 1

No cache result

channel cityName a1 a2 a3
#en.wikipedia null 10,516 21,032 31,548

Result level cache result

channel cityName a1 a2 a3
#en.wikipedia null 10,516 31,548 NULL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions