public class ConsolidatingDruidFilterBuilder extends ConjunctionDruidFilterBuilder
If there is at least one positive filter amongst the filters of a given Dimension, then all of the filters are resolved into a set of DimensionRows at once. A disjunction of selector filters is then built, one for each dimension row in the resolved set.
So the filters:
sports|id-notin[baseball,soccer],sports|desc-contains[ball]
are translated into something like:
OrFilter(select(sports, basketball), select(sports, lacrosse), select(sports, americanFootball))
If all of the filters are negative, then a direct translation of the ApiFilters is returned. So, the following filters:
sports|id-notin[baseball,soccer],sports|season-notin[summer]
are translated into something like:
AndFilter(
NotFilter(OrFilter(select(sports, soccer), select(sports, baseball))),
NotFilter(OrFilter(select(sports, baseball), select(sports, track), select(sports, lacrosse)))
)
Constructor and Description |
---|
ConsolidatingDruidFilterBuilder() |
Modifier and Type | Method and Description |
---|---|
protected Filter |
buildDimensionFilter(Dimension dimension,
Set<ApiFilter> filters)
Take the conjunction of all the filters on a single dimension.
|
buildFilters, buildSelectorFilters, getFilteredDimensionRows
protected Filter buildDimensionFilter(Dimension dimension, Set<ApiFilter> filters) throws DimensionRowNotFoundException
ConjunctionDruidFilterBuilder
buildDimensionFilter
in class ConjunctionDruidFilterBuilder
dimension
- Dimension for the filtersfilters
- All filters belonging to that dimensionDimensionRowNotFoundException
- if we attempt to filter a dimension without dimension rowsCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.