blerer commented on code in PR #3095:
URL: https://github.com/apache/cassandra/pull/3095#discussion_r1568634595
##########
src/java/org/apache/cassandra/cql3/restrictions/RestrictionSet.java:
##########
@@ -171,179 +175,119 @@ public boolean hasRestrictionFor(ColumnMetadata.Kind
kind)
*/
public RestrictionSet addRestriction(SingleRestriction restriction)
{
- // RestrictionSet is immutable so we need to clone the restrictions
map.
- TreeMap<ColumnMetadata, SingleRestriction> newRestrictions = new
TreeMap<>(this.restrictions);
+ // RestrictionSet is immutable. Therefore, we need to clone the
restrictions map.
+ NavigableMap<ColumnMetadata, SingleRestriction> newRestricitons = new
TreeMap<>(this.restrictions);
- boolean newHasIn = hasIn || restriction.isIN();
- boolean newHasContains = hasContains || restriction.isContains();
+ boolean newHasIN = hasIn || restriction.isIN();
boolean newHasSlice = hasSlice || restriction.isSlice();
- boolean newHasAnn = hasAnn || restriction.isANN();
- boolean newHasOnlyEqualityRestrictions = hasOnlyEqualityRestrictions
&& (restriction.isEQ() || restriction.isIN());
+ boolean newHasANN = hasAnn || restriction.isANN();
+ boolean newNeedsFilteringOrIndexing = needsFilteringOrIndexing ||
restriction.needsFilteringOrIndexing();
Review Comment:
Could you explain more? I am not understanding the comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]