private static boolean isNullRestriction(Restriction r, Bound b) { return r == null || (r.isSlice() && !((Restriction.Slice)r).hasBound(b)); }
private boolean isColumnRange() { // Due to CASSANDRA-5762, we always do a slice for CQL3 tables (not dense, composite). // Static CF (non dense but non composite) never entails a column slice however if (!cfm.comparator.isDense()) return cfm.comparator.isCompound(); // Otherwise (i.e. for compact table where we don't have a row marker anyway and thus don't care about CASSANDRA-5762), // it is a range query if it has at least one the column alias for which no relation is defined or is not EQ. for (Restriction r : columnRestrictions) { if (r == null || r.isSlice()) return true; } return false; }
private boolean includeKeyBound(Bound b) { for (Restriction r : keyRestrictions) { if (r == null) return true; else if (r.isSlice()) { assert !r.isMultiColumn() : "Unexpectedly got multi-column restriction on partition key"; return ((SingleColumnRestriction.Slice)r).isInclusive(b); } } // All equality return true; }
else if (restriction.isSlice() && ((Slice) restriction).hasBound(Bound.END))
assert r != null && !r.isSlice();
else if (!restriction.isSlice())
assert r != null && !r.isSlice();
else if (restriction.isSlice())
return Collections.singletonList(eocBound == Bound.END ? prefix.end() : prefix.start()); if (r.isSlice())
if (restriction.isSlice())
def.name, operator)); else if (!existing.isSlice())
if (restriction.isSlice()) lastSliceRestriction = restriction;
else if (!existingRestriction.isSlice()) throw new InvalidRequestException(String.format("Column \"%s\" cannot be restricted by both an equality and an inequality relation", def.name)); else if (existingRestriction.isOnToken() != newRel.onToken)