suneet-s commented on a change in pull request #9247: Add JoinableFactory 
interface and use it in the query stack.
URL: https://github.com/apache/druid/pull/9247#discussion_r370715474
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/druid/segment/ReferenceCountingSegment.java
 ##########
 @@ -167,6 +166,30 @@ public void close()
     }
   }
 
+  public ReferenceCounter referenceCounter()
+  {
+    return new ReferenceCounter()
+    {
+      @Override
+      public boolean increment()
+      {
+        return ReferenceCountingSegment.this.increment();
+      }
+
+      @Override
+      public Closeable decrementOnceCloseable()
+      {
+        return ReferenceCountingSegment.this.decrementOnceCloseable();
+      }
+
+      @Override
+      public void decrement()
+      {
+        ReferenceCountingSegment.this.decrement();
+      }
+    };
 
 Review comment:
   Make `ReferenceCountingSegment` implement `ReferenceCounter`. Then this 
function can just be `return this;`
   
   Which also means less inner classes and less lines of code to read in a 
delta 🙃 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to