dcapwell commented on code in PR #2625:
URL: https://github.com/apache/cassandra/pull/2625#discussion_r1337475565


##########
src/java/org/apache/cassandra/db/partitions/UnfilteredPartitionIterators.java:
##########
@@ -45,10 +45,29 @@ private UnfilteredPartitionIterators() {}
 
     public interface MergeListener
     {
+        /**
+         * Returns true if the merger needs to preserve the position of 
sources within the merge when passing data to
+         * the listener. If false, the merger can avoid creating empty sources 
for non-present partitions and
+         * significantly speed up processing.
+         *
+         * @return True to preserve position of source iterators.
+         */
+        public default boolean preserveOrder() { return true; }
         public UnfilteredRowIterators.MergeListener 
getRowMergeListener(DecoratedKey partitionKey, List<UnfilteredRowIterator> 
versions);
         public default void close() {}
 
-        public static MergeListener NOOP = (partitionKey, versions) -> 
UnfilteredRowIterators.MergeListener.NOOP;
+        public static MergeListener NOOP = new MergeListener()
+        {
+            @Override
+            public boolean preserveOrder() {

Review Comment:
   style, should move `{` to the next line



-- 
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]

Reply via email to