gortiz commented on code in PR #13733:
URL: https://github.com/apache/pinot/pull/13733#discussion_r1747183652
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MultiStageOperator.java:
##########
@@ -167,6 +173,26 @@ protected TransferableBlock
updateEosBlock(TransferableBlock upstreamEos, StatMa
return upstreamEos;
}
+ @Override
+ public ExplainInfo getExplainInfo() {
+ return new ExplainInfo(getExplainName(), getExplainAttributes(),
getChildrenExplainInfo());
+ }
+
+ protected List<ExplainInfo> getChildrenExplainInfo() {
+ return getChildOperators().stream()
+ .filter(Objects::nonNull)
+ .map(Operator::getExplainInfo)
+ .collect(Collectors.toList());
+ }
+
+ protected String getExplainName() {
+ return toExplainString();
+ }
+
+ protected Map<String, Plan.ExplainNode.AttributeValue>
getExplainAttributes() {
+ return Collections.emptyMap();
+ }
Review Comment:
That is what I tried on the first iteration but... these method should be
public, which is something I don't like because that is not part of the
`Operator` interface. We could create another abstract class that extended by
both `BaseOperator` and `MultiStageOperator`. I'm open to add that change, but
I think this is simpler for now.
--
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]