irinaJT opened a new issue, #16166:
URL: https://github.com/apache/druid/issues/16166

    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. 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to