gortiz commented on code in PR #12704: URL: https://github.com/apache/pinot/pull/12704#discussion_r1583055716
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/LeafStageTransferableBlockOperator.java: ########## @@ -135,14 +160,128 @@ protected TransferableBlock getNextBlock() } } - private TransferableBlock constructMetadataBlock() { - // All data blocks have been returned. Record the stats and return EOS. - Map<String, String> executionStats = _executionStats; + private void mergeExecutionStats(@Nullable Map<String, String> executionStats) { if (executionStats != null) { - OperatorStats operatorStats = _opChainStats.getOperatorStats(_context, getOperatorId()); - operatorStats.recordExecutionStats(executionStats); + for (Map.Entry<String, String> entry : executionStats.entrySet()) { + DataTable.MetadataKey key = DataTable.MetadataKey.getByName(entry.getKey()); + if (key == null) { + LOGGER.debug("Skipping unknown execution stat: {}", entry.getKey()); + continue; + } + switch (key) { + case UNKNOWN: + LOGGER.debug("Skipping unknown execution stat: {}", entry.getKey()); + break; + case TABLE: Review Comment: Nah, it doesn't seem easy to add the table when the stat json is being build. Specifically in cases like the one where we have a pipeline breaker (semi join) the logical plan is quite different to the physical plan which makes it very difficult to infer the name of the table from the logical plan. Even it is a bit hackish, I'm going to keep it the table as a stat. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org