Browse Source

Merge pull request #15961 from ghalliday/issue27453

HPCC-27453 Add an attribute onto activity in the graph for complex helpers

Reviewed-By: Shamser Ahmed <shamser.ahmed@lexisnexis.co.uk>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 3 years ago
parent
commit
1d94828247
4 changed files with 7 additions and 2 deletions
  1. 1 0
      common/workunit/wuattr.cpp
  2. 1 0
      common/workunit/wuattr.hpp
  3. 3 0
      ecl/hqlcpp/hqlhtcpp.cpp
  4. 2 2
      ecl/hqlcpp/hqlttcpp.cpp

+ 1 - 0
common/workunit/wuattr.cpp

@@ -150,6 +150,7 @@ const static WuAttrInfo attrInfo[] = {
     CHILD(DiskFormat, SMeasureText, "diskFormat"),
     CHILD(RecordFormat, SMeasureText, "recordFormat"),
     CHILD(ServiceName, SMeasureText, "serviceName"),
+    CHILD(ComplexHelperSize, SMeasureSize, "complexHelperSize"),
     { WaMax, SMeasureNone, nullptr, nullptr, nullptr, nullptr, nullptr, WaNone, WaNone }
 };
 

+ 1 - 0
common/workunit/wuattr.hpp

@@ -135,6 +135,7 @@ enum WuAttr : unsigned
     WaDiskFormat,
     WaRecordFormat,
     WaServiceName,
+    WaComplexHelperSize,
     WaMax
 };
 inline WuAttr & operator++(WuAttr & x) { assert(x<WaMax); x = (WuAttr)(x+1); return x; }

+ 3 - 0
ecl/hqlcpp/hqlhtcpp.cpp

@@ -2409,7 +2409,10 @@ void ActivityInstance::buildSuffix()
         if (options.spotComplexClasses && (approxSize >= options.complexClassesThreshold))
         {
             if ((options.complexClassesActivityFilter == 0) || (kind == options.complexClassesActivityFilter))
+            {
                 translator.WARNING2(CategoryEfficiency, HQLWRN_ComplexHelperClass, activityId, approxSize);
+                addAttributeInt(WaComplexHelperSize, approxSize);
+            }
         }
         if (!options.obfuscateOutput && options.showActivitySizeInGraph)
             addAttributeInt(WaSizeClassApprox, approxSize);

+ 2 - 2
ecl/hqlcpp/hqlttcpp.cpp

@@ -10305,7 +10305,7 @@ IHqlExpression * HqlScopeTagger::transformNewDataset(IHqlExpression * expr, bool
             if (!isAlwaysActiveRow(ds))
             {
                 StringBuffer exprText;
-                VStringBuffer msg("%s - Need to use active(dataset) to refer to the current row of an active dataset", getECL(expr, exprText));
+                VStringBuffer msg("%s - Need to use ROW(dataset) to refer to the current row of an active dataset", getECL(expr, exprText));
                 reportError(CategoryError, msg);
             }
         }
@@ -10317,7 +10317,7 @@ IHqlExpression * HqlScopeTagger::transformNewDataset(IHqlExpression * expr, bool
         if (!isActiveOk)
         {
             StringBuffer exprText;
-            VStringBuffer msg("%s - Need to use active(dataset) to refer to the current row of an active dataset", getECL(expr, exprText));
+            VStringBuffer msg("%s - Need to use ROW(dataset) to refer to the current row of an active dataset", getECL(expr, exprText));
             reportError(CategoryError, msg);
         }