pranavshenoy commented on code in PR #4909:
URL: https://github.com/apache/cassandra/pull/4909#discussion_r3541015408


##########
src/java/org/apache/cassandra/db/tries/InMemoryTrie.java:
##########
@@ -920,25 +995,35 @@ private <R> int putRecursive(int node, ByteSource key, R 
value, final UpsertTran
     }
 
     private <R> int applyContent(int node, R value, UpsertTransformer<T, R> 
transformer) throws SpaceExhaustedException
+    {
+        return applyContent(node, value, transformer, false);
+    }
+
+    private <R> int applyContent(int node, R value, UpsertTransformer<T, R> 
transformer, boolean intermediate) throws SpaceExhaustedException
     {
         if (isNull(node))
-            return ~addContent(transformer.apply(null, value));
+            return ~addContent(combine(transformer, null, value, 
intermediate));
 
         if (isLeaf(node))
         {
             int contentIndex = ~node;
-            setContent(contentIndex, 
transformer.apply(getContent(contentIndex), value));
+            setContent(contentIndex, combine(transformer, 
getContent(contentIndex), value, intermediate));

Review Comment:
   should we overload transformer.apply() with an extra arg instead of 
applyIntermeditate?



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