gortiz commented on code in PR #16728:
URL: https://github.com/apache/pinot/pull/16728#discussion_r2358910453


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/BaseOperator.java:
##########
@@ -59,6 +53,18 @@ public ExplainInfo getExplainInfo() {
     return new ExplainInfo(getExplainName(), attributeBuilder.build(), 
getChildrenExplainInfo());
   }
 
+  protected void checkTermination() {
+    QueryThreadContext.checkTermination(this::getExplainName);
+  }
+
+  protected void checkTerminationAndSampleUsage() {
+    QueryThreadContext.checkTerminationAndSampleUsage(this::getExplainName);
+  }
+
+  protected void checkTerminationAndSampleUsagePeriodically(int 
numRecordsProcessed) {
+    
QueryThreadContext.checkTerminationAndSampleUsagePeriodically(numRecordsProcessed,
 this::getExplainName);
+  }

Review Comment:
    Recently, I found these optimistic lambdas were actually affecting 
performance. I would suggest otherwise: Let's go for the verbose but 
performance safe solution or include a benchmark proving the lambda is not 
expensive.
   
   Recent PR I mentioned: 
   - Lambdas affecting aggregate: https://github.com/apache/pinot/pull/16798



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