gortiz commented on code in PR #16728:
URL: https://github.com/apache/pinot/pull/16728#discussion_r2377973896
##########
pinot-core/src/main/java/org/apache/pinot/core/operator/BaseOperator.java:
##########
@@ -59,6 +53,14 @@ public ExplainInfo getExplainInfo() {
return new ExplainInfo(getExplainName(), attributeBuilder.build(),
getChildrenExplainInfo());
}
+ protected void checkTermination() {
+ QueryThreadContext.checkTermination(this::getExplainName);
+ }
+
+ protected void checkTerminationAndSampleUsage() {
+ QueryThreadContext.checkTerminationAndSampleUsage(this::getExplainName);
+ }
Review Comment:
What do you mean? My point is that we need to allocate the lambda each time
we call the method. That lambda makes sense to calculate the name lazily, but
in this case, the name is a static, so the laziness is actually making the call
more expensive
--
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]