/** * Checks if the query need to use filtering. * @return <code>true</code> if the query need to use filtering, <code>false</code> otherwise. */ public boolean needFiltering() { int numberOfRestrictions = filterRestrictions.getCustomIndexExpressions().size(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) numberOfRestrictions += restrictions.size(); return numberOfRestrictions > 1 || (numberOfRestrictions == 0 && !clusteringColumnsRestrictions.isEmpty()) || (numberOfRestrictions != 0 && nonPrimaryKeyRestrictions.hasMultipleContains()); }
/** * Checks if the query need to use filtering. * @return <code>true</code> if the query need to use filtering, <code>false</code> otherwise. */ public boolean needFiltering() { int numberOfRestrictions = filterRestrictions.getCustomIndexExpressions().size(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) numberOfRestrictions += restrictions.size(); return numberOfRestrictions > 1 || (numberOfRestrictions == 0 && !clusteringColumnsRestrictions.isEmpty()) || (numberOfRestrictions != 0 && nonPrimaryKeyRestrictions.hasMultipleContains()); }
/** * Checks if the query need to use filtering. * @return <code>true</code> if the query need to use filtering, <code>false</code> otherwise. */ public boolean needFiltering() { int numberOfRestrictions = filterRestrictions.getCustomIndexExpressions().size(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) numberOfRestrictions += restrictions.size(); return numberOfRestrictions > 1 || (numberOfRestrictions == 0 && !clusteringColumnsRestrictions.isEmpty()) || (numberOfRestrictions != 0 && nonPrimaryKeyRestrictions.hasMultipleContains()); }
public RowFilter getRowFilter(SecondaryIndexManager indexManager, QueryOptions options) { if (filterRestrictions.isEmpty()) return RowFilter.NONE; RowFilter filter = RowFilter.create(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) restrictions.addRowFilterTo(filter, indexManager, options); for (CustomIndexExpression expression : filterRestrictions.getCustomIndexExpressions()) expression.addToRowFilter(filter, cfm, options); return filter; }
public RowFilter getRowFilter(SecondaryIndexManager indexManager, QueryOptions options) { if (filterRestrictions.isEmpty()) return RowFilter.NONE; RowFilter filter = RowFilter.create(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) restrictions.addRowFilterTo(filter, indexManager, options); for (CustomIndexExpression expression : filterRestrictions.getCustomIndexExpressions()) expression.addToRowFilter(filter, cfm, options); return filter; }
public RowFilter getRowFilter(SecondaryIndexManager indexManager, QueryOptions options) { if (filterRestrictions.isEmpty()) return RowFilter.NONE; RowFilter filter = RowFilter.create(); for (Restrictions restrictions : filterRestrictions.getRestrictions()) restrictions.addRowFilterTo(filter, indexManager, options); for (CustomIndexExpression expression : filterRestrictions.getCustomIndexExpressions()) expression.addToRowFilter(filter, cfm, options); return filter; }
hasQueriableIndex = !filterRestrictions.getCustomIndexExpressions().isEmpty() || hasQueriableClusteringColumnIndex || partitionKeyRestrictions.hasSupportingIndex(secondaryIndexManager)
hasQueriableIndex = !filterRestrictions.getCustomIndexExpressions().isEmpty() || hasQueriableClusteringColumnIndex || partitionKeyRestrictions.hasSupportingIndex(secondaryIndexManager)
hasQueriableIndex = !filterRestrictions.getCustomIndexExpressions().isEmpty() || hasQueriableClusteringColumnIndex || partitionKeyRestrictions.hasSupportingIndex(secondaryIndexManager)