Ver código fonte

Merge pull request #11089 from ghalliday/issue19555

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

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 anos atrás
pai
commit
c9118e16d4

+ 3 - 0
ecl/eclagent/eclgraph.cpp

@@ -814,6 +814,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

@@ -5445,7 +5445,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

@@ -7344,6 +7344,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

@@ -1947,6 +1947,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"));