Lookup is not found when using as a part of filtered aggregation
irinaJT opened this issue · comments
irinaJT commented
Lookup is not found when using as a part of filtered aggregation
Affected Version
28.0.1
Description
Some queries which did work in the earlier druid version (26.0.0) throw and error in the 28th. It happens when querying for the aggregation which uses lookup as a filter.
This is the example of problematic aggregation
{
"type": "filtered",
"filter": {
"type": "selector",
"dimension": "country_id",
"value": "FR",
"extractionFn": {
"type": "cascade",
"extractionFns": [
{
"type": "registeredLookup",
"lookup": "countries_iso2"
},
{
"type": "lower"
}
]
}
},
"aggregator": {
"type": "doubleSum",
"name": "total",
"fieldName": "total"
}
}
And error is
Error: undefined
Cannot construct instance of `org.apache.druid.query.aggregation.FilteredAggregatorFactory`, problem: Lookup [countries_iso2] not found at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 1343] (through reference chain: org.apache.druid.query.timeseries.TimeseriesQuery["aggregations"]->java.util.ArrayList[1])
com.fasterxml.jackson.databind.exc.ValueInstantiationException
But lookup is present and if I use the same filter as a part of query filter, it does work without any issues. Not sure, if it is a configuration issue (though, didn't find anything in the docs related to the limitations of using lookups for filtered aggregation) or a bug in the latest updates.