/** * Resolves a set of ApiFilters into a list of dimension rows that need to be filtered in Druid. * * @param dimension The dimension being filtered * @param filters The filters being applied to the {@code dimension} * * @return A list of dimension rows that Druid needs to filter on * * @throws DimensionRowNotFoundException if the filters filter out all dimension rows */ protected Set<DimensionRow> getFilteredDimensionRows(Dimension dimension, Set<ApiFilter> filters) throws DimensionRowNotFoundException { Set<DimensionRow> rows = dimension.getSearchProvider().findFilteredDimensionRows(filters); if (rows.isEmpty()) { String msg = ErrorMessageFormat.DIMENSION_ROWS_NOT_FOUND.format(dimension.getApiName(), filters); LOG.debug(msg); throw new DimensionRowNotFoundException(msg); } return rows; }