/** * Checks if underlying restrictions would require filtering * * @return <code>true</code> if any underlying restrictions require filtering, <code>false</code> * otherwise */ public final boolean needFiltering() { int position = 0; for (SingleRestriction restriction : restrictions) { if (handleInFilter(restriction, position)) return true; if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } return hasContains(); }
/** * Checks if underlying restrictions would require filtering * * @return <code>true</code> if any underlying restrictions require filtering, <code>false</code> * otherwise */ public final boolean needFiltering() { int position = 0; for (SingleRestriction restriction : restrictions) { if (handleInFilter(restriction, position)) return true; if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } return hasContains(); }
/** * Checks if underlying restrictions would require filtering * * @return <code>true</code> if any underlying restrictions require filtering, <code>false</code> * otherwise */ public final boolean needFiltering() { int position = 0; for (SingleRestriction restriction : restrictions) { if (handleInFilter(restriction, position)) return true; if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } return hasContains(); }
@Override public void addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException { int position = 0; for (SingleRestriction restriction : restrictions) { // We ignore all the clustering columns that can be handled by slices. if (handleInFilter(restriction, position) || restriction.hasSupportingIndex(indexManager)) { restriction.addRowFilterTo(filter, indexManager, options); continue; } if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } }
@Override public void addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException { int position = 0; for (SingleRestriction restriction : restrictions) { // We ignore all the clustering columns that can be handled by slices. if (handleInFilter(restriction, position) || restriction.hasSupportingIndex(indexManager)) { restriction.addRowFilterTo(filter, indexManager, options); continue; } if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } }
@Override public void addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) throws InvalidRequestException { int position = 0; for (SingleRestriction restriction : restrictions) { // We ignore all the clustering columns that can be handled by slices. if (handleInFilter(restriction, position) || restriction.hasSupportingIndex(indexManager)) { restriction.addRowFilterTo(filter, indexManager, options); continue; } if (!restriction.isSlice()) position = restriction.getLastColumn().position() + 1; } }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }
public NavigableSet<ClusteringBound> boundsAsClustering(Bound bound, QueryOptions options) throws InvalidRequestException { MultiCBuilder builder = MultiCBuilder.create(comparator, hasIN() || hasMultiColumnSlice()); int keyPosition = 0; for (SingleRestriction r : restrictions) { if (handleInFilter(r, keyPosition)) break; if (r.isSlice()) { r.appendBoundTo(builder, bound, options); return builder.buildBoundForSlice(bound.isStart(), r.isInclusive(bound), r.isInclusive(bound.reverse()), r.getColumnDefs()); } r.appendBoundTo(builder, bound, options); if (builder.hasMissingElements()) return BTreeSet.empty(comparator); keyPosition = r.getLastColumn().position() + 1; } // Everything was an equal (or there was nothing) return builder.buildBound(bound.isStart(), true); }