Github user amansinha100 commented on a diff in the pull request:
https://github.com/apache/drill/pull/1141#discussion_r171723902
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/ops/FragmentStats.java ---
@@ -79,4 +71,21 @@ public void addOperatorStats(OperatorStats stats) {
operators.add(stats);
}
+ //DRILL-6197
+ public OperatorStats addOrReplaceOperatorStats(OperatorStats stats) {
+ //Remove existing stat
+ OperatorStats replacedStat = null;
+ int index = 0;
+ for (OperatorStats opStat : operators) {
--- End diff --
Some TPC-DS queries have fairly long list of operators within a fragment
and in general it would be preferable to not do this search. Can you point to
where this Json serialization happens ? my guess is it just needs to preserve
the insertion order. In that case we could use a LinkedHashSet which would
provide both the duplicate removal and keep insertion order.
---