clintropolis commented on a change in pull request #6397: Adds bloom filter 
aggregator to 'druid-bloom-filters' extension
URL: https://github.com/apache/incubator-druid/pull/6397#discussion_r251123731
 
 

 ##########
 File path: 
extensions-core/druid-bloom-filter/src/main/java/org/apache/druid/query/aggregation/bloom/BloomFilterAggregatorFactory.java
 ##########
 @@ -89,27 +87,69 @@ public BloomFilterAggregatorFactory(
   @Override
   public Aggregator factorize(ColumnSelectorFactory columnFactory)
   {
-    ColumnSelectorPlus<BloomFilterAggregatorColumnSelectorStrategy> 
selectorPlus =
-        DimensionHandlerUtils.createColumnSelectorPlus(
-            STRATEGY_FACTORY,
-            field,
-            columnFactory
-        );
+    BloomKFilter filter = new BloomKFilter(maxNumEntries);
+    ColumnCapabilities capabilities = 
columnFactory.getColumnCapabilities(field.getDimension());
+    BaseNullableColumnValueSelector selector = 
columnFactory.makeColumnValueSelector(field.getDimension());
 
-    return new BloomFilterAggregator(selectorPlus, maxNumEntries);
+    if (selector instanceof NilColumnValueSelector) {
+      return new NilBloomFilterAggregator((NilColumnValueSelector) selector, 
filter);
 
 Review comment:
   `BloomKFilter` must be the same size to merge, so it's not possible to make 
a constant. :+1: on the signature change though, will do that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to