Github user amansinha100 commented on a diff in the pull request: https://github.com/apache/drill/pull/1116#discussion_r167288758 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java --- @@ -45,12 +45,25 @@ private final String operatorName; private final int size; - public OperatorWrapper(int major, List<ImmutablePair<ImmutablePair<OperatorProfile, Integer>, String>> opsAndHostsList) { + public OperatorWrapper(int major, List<ImmutablePair<ImmutablePair<OperatorProfile, Integer>, String>> opsAndHostsList, Map<String, String> phyOperMap) { Preconditions.checkArgument(opsAndHostsList.size() > 0); this.major = major; firstProfile = opsAndHostsList.get(0).getLeft().getLeft(); operatorType = CoreOperatorType.valueOf(firstProfile.getOperatorType()); - operatorName = operatorType == null ? UNKNOWN_OPERATOR : operatorType.toString(); + //Update Name from Physical Map + String path = new OperatorPathBuilder().setMajor(major).setOperator(firstProfile).build(); + //Use Plan Extracted Operator Names if available + String extractedOpName = phyOperMap.get(path); + String inferredOpName = operatorType == null ? UNKNOWN_OPERATOR : operatorType.toString(); + //Revert to inferred names for exceptional cases --- End diff -- Can you clarify 'exception cases' .. there are 2 examples below but it is not immediately clear which operators would fall into this pattern. I assume the main mismatch is that the physical plan has EXCHANGE operators whereas the profile has SENDER and RECEIVER.
---