Browse Source

HPCC-16531 Label filtered disk count/exist in the graph

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 8 years ago
parent
commit
18c9dc61d0
1 changed files with 19 additions and 3 deletions
  1. 19 3
      ecl/hqlcpp/hqlsource.cpp

+ 19 - 3
ecl/hqlcpp/hqlsource.cpp

@@ -1795,6 +1795,22 @@ inline bool useDescriptiveGraphLabel(ThorActivityKind kind)
 }
 
 
+static bool expandGraphLabel(ThorActivityKind kind)
+{
+    switch (kind)
+    {
+    case TAKdiskread:
+    case TAKcsvread:
+    case TAKxmlread:
+    case TAKjsonread:
+    case TAKdiskcount:
+    case TAKdiskexists:
+        return true;
+    default:
+        return false;
+    }
+}
+
 ABoundActivity * SourceBuilder::buildActivity(BuildCtx & ctx, IHqlExpression * expr, ThorActivityKind _activityKind, const char *kind, ABoundActivity *input)
 {
     activityKind = _activityKind;
@@ -1821,7 +1837,7 @@ ABoundActivity * SourceBuilder::buildActivity(BuildCtx & ctx, IHqlExpression * e
 
     bool isFiltered = false;
     double filterLikelihood = 1.0;
-    if ((activityKind == TAKdiskread) || (activityKind == TAKcsvread) || (activityKind == TAKxmlread) || (activityKind == TAKjsonread))
+    if (expandGraphLabel(activityKind))
     {
         graphLabel.clear();
         if (expr != tableExpr)
@@ -1872,6 +1888,8 @@ ABoundActivity * SourceBuilder::buildActivity(BuildCtx & ctx, IHqlExpression * e
 
         if ((translator.getTargetClusterType() == RoxieCluster) && isSpill)
             graphLabel.append("Read");
+        else if (isExplicitExists() && (activityKind == TAKdiskcount))
+            graphLabel.append("Disk Exists");
         else
             graphLabel.append(getActivityText(activityKind));
     }
@@ -1879,8 +1897,6 @@ ABoundActivity * SourceBuilder::buildActivity(BuildCtx & ctx, IHqlExpression * e
     {
         if (activityKind == TAKindexcount)
             graphLabel.clear().append("Index Exists");
-        else
-            graphLabel.clear().append("Disk Exists");
     }
     if (useDescriptiveGraphLabel(activityKind))
     {