[ https://issues.apache.org/jira/browse/DRILL-6140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358711#comment-16358711 ]
ASF GitHub Bot commented on DRILL-6140: --------------------------------------- Github user amansinha100 commented on a diff in the pull request: https://github.com/apache/drill/pull/1116#discussion_r167269862 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/ProfileWrapper.java --- @@ -322,4 +330,16 @@ public String getOperatorsJSON() { public boolean isOnlyImpersonationEnabled() { return onlyImpersonationEnabled; } + + //Generates operator names inferred from physical plan + private void generateOpMap(String plan) { + this.physicalOperatorMap = new HashMap<String,String>(); + String[] operatorLine = plan.split("\\n"); + for (String line : operatorLine) { + String[] lineToken = line.split("\\s+", 3); + String operatorPath = lineToken[0].trim().replaceFirst("-", "-xx-"); //Required format for lookup --- End diff -- Can you add (as a comment) the sample text from the physical plan output that this is parsing. > Operators listed in Profiles Page doesn't always correspond with operator > specified in Physical Plan > ---------------------------------------------------------------------------------------------------- > > Key: DRILL-6140 > URL: https://issues.apache.org/jira/browse/DRILL-6140 > Project: Apache Drill > Issue Type: Bug > Components: Web Server > Affects Versions: 1.12.0 > Reporter: Kunal Khatua > Assignee: Kunal Khatua > Priority: Major > Fix For: 1.13.0 > > Attachments: 25978a1a-24cf-fb4a-17af-59e7115b4fa1.sys.drill > > > A query's physical plan correctly shows > {code} > 00-00 Screen : rowType = RecordType(BIGINT EXPR$0): rowcount = 1.0, > cumulative cost = { ... > 00-01 Project(EXPR$0=[$0]) : rowType = RecordType(BIGINT EXPR$0): rowcount > = 1.0, cumulative cost = { ... > 00-02 StreamAgg(group=[{}], EXPR$0=[$SUM0($0)]) : rowType = > RecordType(BIGINT EXPR$0): rowcount = 1.0, cumulative cost = { ... > 00-03 UnionExchange : rowType = RecordType(BIGINT EXPR$0): rowcount = > 1.0, cumulative cost = { ... > 01-01 StreamAgg(group=[{}], EXPR$0=[COUNT()]) : rowType = > RecordType(BIGINT EXPR$0): rowcount = 1.0, cumulative cost = { ... > 01-02 Project($f0=[0]) : rowType = RecordType(INTEGER $f0): > rowcount = 1.79279253E7, cumulative cost = ... > 01-03 Flatten(flattenField=[$1]) : rowType = RecordType(ANY > rfsSpecCode, ... > 01-04 Project(rfsSpecCode=[$1], PUResultsArray=[$2]) : rowType > = ... > 01-05 SelectionVectorRemover : rowType = RecordType(ANY > schemaName, ... > 01-06 Filter(condition=[=($0, 'OnyxBlue')]) : rowType = ... > 01-07 Project(schemaName=[$0], ITEM=[ITEM($1, > 'rfsSpecCode')], ... > 01-08 Scan(groupscan=[ParquetGroupScan > [entries=[ReadEntryWithPath [ > {code} > However, the profile page shows the operators as... > ||Operator ID || Type || Metrics|| > |00-xx-00 | SCREEN | ... | > |00-xx-01 | PROJECT | ... | > |00-xx-02 | STREAMING_AGGREGATE | ... | > |00-xx-03 | UNORDERED_RECEIVER | ... | > |01-xx-00 | SINGLE_SENDER | ... | > |01-xx-01 | STREAMING_AGGREGATE | ... | > |01-xx-02 | PROJECT | ... | > |01-xx-03 | SINGLE_SENDER | ... | > |01-xx-04 | PROJECT | ... | > |01-xx-05 | SELECTION_VECTOR_REMOVER | ... | > |01-xx-06 | FILTER | ... | > |01-xx-07 | PROJECT | ... | > |01-xx-08 | PARQUET_ROW_GROUP_SCAN | ... | > As you can see ... {{FLATTEN}} operator appears as a {{SINGLE_SENDER}} > making the profile hard to interpret. -- This message was sent by Atlassian JIRA (v7.6.3#76005)