aweisberg commented on code in PR #4104:
URL: https://github.com/apache/cassandra/pull/4104#discussion_r2050774042


##########
src/java/org/apache/cassandra/db/filter/RowFilter.java:
##########
@@ -172,15 +174,21 @@ public boolean isStrict()
      */
     public boolean isMutableIntersection()
     {
-        int count = 0;
+        Set<ColumnMetadata> columns = null;
         for (Expression e : expressions)
         {
             if (e.column.isStatic() && expressions.size() > 1)
                 return true;
 
             if (!e.column.isPrimaryKeyColumn())
-                if (++count > 1)
+            {
+                if (columns == null)
+                    columns = new HashSet<>(expressions.size());

Review Comment:
   This will be slightly faster if you can use the unique ID of the column 
because it won't have to hash and equals every single field in column metadata.



-- 
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: pr-unsubscr...@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org
For additional commands, e-mail: pr-h...@cassandra.apache.org

Reply via email to