Browse Source

HPCC-19555 Move information about child queries to the correct subgraph

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 7 years ago
parent
commit
452bc847a2
4 changed files with 10 additions and 1 deletions
  1. 3 0
      ecl/eclagent/eclgraph.cpp
  2. 1 1
      ecl/hqlcpp/hqlcppds.cpp
  3. 2 0
      ecl/hqlcpp/hqlhtcpp.cpp
  4. 4 0
      thorlcr/graph/thgraph.cpp

+ 3 - 0
ecl/eclagent/eclgraph.cpp

@@ -810,6 +810,9 @@ void EclSubGraph::createFromXGMML(EclGraph * graph, ILoadedDllEntry * dll, IProp
     {
         IPropertyTree &edge = iter2->query();
 
+        if (edge.getPropBool("att[@name=\"_childGraph\"]/@value", false))
+            continue;
+
         unsigned sourceId = edge.getPropInt("@source");
         unsigned targetId = edge.getPropInt("@target");
         unsigned sourceOutput = edge.getPropInt("att[@name=\"_sourceIndex\"]/@value", 0);

+ 1 - 1
ecl/hqlcpp/hqlcppds.cpp

@@ -5442,7 +5442,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivitySetGraphResult(BuildCtx & ctx,
         else
             relationship = "Child";
 
-        addDependency(ctx, instance->queryBoundActivity(), parentActivity, childAtom, relationship);
+        addDependency(ctx, instance->queryBoundActivity(), parentActivity->queryActive(), childAtom, relationship);
     }
 
     instance->addAttributeBool(WaIsSpill, isSpill);

+ 2 - 0
ecl/hqlcpp/hqlhtcpp.cpp

@@ -7312,6 +7312,8 @@ void HqlCppTranslator::addDependency(BuildCtx & ctx, ABoundActivity * sourceActi
             throwError1(HQLERR_DependencyWithinGraph, sinkActivity->queryGraphId());
         graphTree = sinkGraphTree;
     }
+    if (sourceActivity->queryContainerId() == sinkActivity->queryActivityId())
+        graphTree = sinkGraphTree;
 
     unsigned outputIndex = 0;
     if (kind != childAtom)

+ 4 - 0
thorlcr/graph/thgraph.cpp

@@ -1940,6 +1940,10 @@ void CGraphBase::createFromXGMML(IPropertyTree *_node, CGraphBase *_owner, CGrap
     ForEach(*edges)
     {
         IPropertyTree &edge = edges->query();
+        //Ignore edges that represent dependencies from parent activities to child activities.
+        if (edge.getPropBool("att[@name=\"_childGraph\"]/@value", false))
+            continue;
+
         unsigned sourceOutput = edge.getPropInt("att[@name=\"_sourceIndex\"]/@value", 0);
         unsigned targetInput = edge.getPropInt("att[@name=\"_targetIndex\"]/@value", 0);
         CGraphElementBase *source = queryElement(edge.getPropInt("@source"));