KKcorps commented on code in PR #10337: URL: https://github.com/apache/pinot/pull/10337#discussion_r1117956075
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/OperatorStats.java: ########## @@ -65,14 +66,18 @@ public void recordRow(int numBlock, int numRows) { _numRows += numRows; } + public void recordSingleStat(String key, String stat) { + _executionStats.put(key, stat); + } + public void recordExecutionStats(Map<String, String> executionStats) { - _executionStats = executionStats; + _executionStats.putAll(executionStats); } public Map<String, String> getExecutionStats() { - _executionStats.put(OperatorUtils.NUM_BLOCKS, String.valueOf(_numBlock)); - _executionStats.put(OperatorUtils.NUM_ROWS, String.valueOf(_numRows)); - _executionStats.put(OperatorUtils.THREAD_EXECUTION_TIME, + _executionStats.putIfAbsent(DataTable.MetadataKey.NUM_BLOCKS.getName(), String.valueOf(_numBlock)); + _executionStats.putIfAbsent(DataTable.MetadataKey.NUM_ROWS.getName(), String.valueOf(_numRows)); + _executionStats.putIfAbsent(DataTable.MetadataKey.OPERATOR_EXECUTION_TIME_MS.getName(), Review Comment: .getExecutionStats is called multiple times but recording stats in the map only once is enough. -- 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