Browse Source

HPCC-8559 Remove legacy thor support

Clean up some run time interfaces that are no longer required.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
7b8a90e853

+ 1 - 1
common/thorhelper/thorcommon.hpp

@@ -367,7 +367,7 @@ public:
     {
         return ctx->getOS();
     }
-    virtual ILocalGraph * resolveLocalQuery(__int64 activityId)
+    virtual IEclGraphResults * resolveLocalQuery(__int64 activityId)
     {
         return ctx->resolveLocalQuery(activityId);
     }

+ 1 - 2
ecl/eclagent/agentctx.hpp

@@ -26,7 +26,6 @@ struct IHThorGraphResult : extends IInterface
 {
     virtual void addRowOwn(const void * row) = 0;
     virtual const void * queryRow(unsigned whichRow) = 0;
-    virtual void getResult(unsigned & len, void * & data) = 0;
     virtual void getLinkedResult(unsigned & count, byte * * & ret) = 0;
     virtual const void * getOwnRow(unsigned whichRow) = 0;      // used internally, removes row from result
 };
@@ -52,7 +51,7 @@ struct IEclLoopGraph : public IInterface
     virtual void executeChild(const byte * parentExtract, IHThorGraphResults * results, IHThorGraphResults * _graphLoopResults) = 0;
 };
 
-struct ILocalGraphEx : public ILocalGraph
+struct ILocalEclGraphResults : public IEclGraphResults
 {
 public:
     virtual IHThorGraphResult * queryResult(unsigned id) = 0;

+ 6 - 13
ecl/eclagent/eclagent.ipp

@@ -537,7 +537,7 @@ public:
     virtual void executeGraph(const char * graphName, bool realThor, size32_t parentExtractSize, const void * parentExtract);
     virtual IHThorGraphResults * executeLibraryGraph(const char * libraryName, unsigned expectedInterfaceHash, unsigned activityId, bool embedded, const byte * parentExtract);
     virtual IThorChildGraph * resolveChildQuery(__int64 subgraphId, IHThorArg * colocal);
-    virtual ILocalGraph * resolveLocalQuery(__int64 activityId);
+    virtual IEclGraphResults * resolveLocalQuery(__int64 activityId);
 
     virtual IHThorGraphResults * createGraphLoopResults();
 
@@ -758,7 +758,6 @@ public:
 
     virtual void addRowOwn(const void * row);
     virtual const void * queryRow(unsigned whichRow);
-    virtual void getResult(unsigned & len, void * & data);
     virtual void getLinkedResult(unsigned & count, byte * * & ret);
     virtual const void * getOwnRow(unsigned whichRow);
 
@@ -775,7 +774,6 @@ public:
 
     virtual void addRowOwn(const void * row);
     virtual const void * queryRow(unsigned whichRow);
-    virtual void getResult(unsigned & len, void * & data);
     virtual void getLinkedResult(unsigned & count, byte * * & ret);
     virtual const void * getOwnRow(unsigned whichRow);
 
@@ -802,10 +800,6 @@ public:
     virtual void setResult(unsigned id, IHThorGraphResult * result);
 
 //interface IEclGraphResults
-    virtual void getResult(size32_t & retSize, void * & ret, unsigned id)
-    {
-        queryResult(id)->getResult(retSize, ret);
-    }
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id)
     {
         queryResult(id)->getLinkedResult(count, ret);
@@ -840,7 +834,7 @@ protected:
     ICodeContext * codeContext;
 };
 
-class EclSubGraph : public CInterface, implements ILocalGraphEx, public IEclLoopGraph, public IThorChildGraph
+class EclSubGraph : public CInterface, implements ILocalEclGraphResults, public IEclLoopGraph, public IThorChildGraph
 {
     friend class EclGraphElement;
 private:
@@ -912,7 +906,7 @@ private:
     class SubGraphCodeContext : public IndirectCodeContext
     {
     public:
-        virtual ILocalGraph * resolveLocalQuery(__int64 activityId)
+        virtual IEclGraphResults * resolveLocalQuery(__int64 activityId)
         {
             if (activityId == container->queryId())
                 return container;
@@ -962,14 +956,13 @@ public:
             return in;
     }
 
-//interface ILocalGraph
+//interface IEclGraphResults
     virtual IHThorGraphResult * queryResult(unsigned id);
     virtual IHThorGraphResult * queryGraphLoopResult(unsigned id);
     virtual IHThorGraphResult * createResult(unsigned id, IEngineRowAllocator * ownedRowsetAllocator);
     virtual IHThorGraphResult * createGraphLoopResult(IEngineRowAllocator * ownedRowsetAllocator);
     virtual IEclGraphResults * evaluate(unsigned parentExtractSize, const byte * parentExtract);
 
-    virtual void getResult(unsigned & len, void * & data, unsigned id);
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id);
     virtual void getDictionaryResult(size32_t & tcount, byte * * & tgt, unsigned id);
     inline unsigned __int64 queryId() const
@@ -1026,7 +1019,7 @@ class EclGraph : public CInterface
             return container->resolveChildQuery((unsigned)subgraphId);
         }
 
-        ILocalGraph * resolveLocalQuery(__int64 activityId) 
+        IEclGraphResults * resolveLocalQuery(__int64 activityId)
         { 
             return container->resolveLocalQuery((unsigned)activityId);
         }
@@ -1060,7 +1053,7 @@ public:
     EclGraphElement * idToActivity(unsigned id);
     const char *queryGraphName() { return graphName; }
     IThorChildGraph * resolveChildQuery( unsigned subgraphId);
-    ILocalGraph * resolveLocalQuery(unsigned subgraphId);
+    IEclGraphResults * resolveLocalQuery(unsigned subgraphId);
     IEclLoopGraph * resolveLoopGraph(unsigned id);
     EclGraphElement * recurseFindActivityFromId(EclSubGraph * subGraph, unsigned id);
     void updateLibraryProgress();

+ 2 - 47
ecl/eclagent/eclgraph.cpp

@@ -1059,11 +1059,6 @@ IHThorGraphResult * EclSubGraph::createGraphLoopResult(IEngineRowAllocator * own
     return graphLoopResults->createResult(ownedRowsetAllocator);
 }
 
-void EclSubGraph::getResult(unsigned & len, void * & data, unsigned id)
-{
-    localResults->queryResult(id)->getResult(len, data);
-}
-
 void EclSubGraph::getLinkedResult(unsigned & count, byte * * & ret, unsigned id)
 {
     localResults->queryResult(id)->getLinkedResult(count, ret);
@@ -1278,11 +1273,6 @@ const void * UninitializedGraphResult::queryRow(unsigned whichRow)
     throw MakeStringException(99, "Graph Result %d accessed before it is created", id);
 }
 
-void UninitializedGraphResult::getResult(unsigned & lenResult, void * & result)
-{
-    throw MakeStringException(99, "Graph Result %d accessed before it is created", id);
-}
-
 void UninitializedGraphResult::getLinkedResult(unsigned & count, byte * * & ret)
 {
     throw MakeStringException(99, "Graph Result %d accessed before it is created", id);
@@ -1311,41 +1301,6 @@ const void * GraphResult::queryRow(unsigned whichRow)
     return NULL;
 }
 
-void GraphResult::getResult(unsigned & lenResult, void * & result)
-{
-    IOutputMetaData * outputMeta = meta;
-    unsigned fixedSize = outputMeta->getFixedSize();
-
-    bool grouped = outputMeta->isGrouped();
-    MemoryBuffer rowdata;
-    unsigned max = rows.ordinality();
-    unsigned i;
-    for (i = 0; i < max; i++)
-    {
-        const void * nextrec = rows.item(i);
-        size32_t thisSize = fixedSize ? fixedSize : outputMeta->getRecordSize(nextrec);
-        rowdata.append(thisSize, nextrec);
-        if (grouped)
-        {
-            bool eog = false;
-            if (rows.isItem(i+1))
-            {
-                if (!rows.item(i+1))
-                {
-                    eog = true;
-                    i++;
-                }
-            }
-            else
-                eog = true;
-            rowdata.append(eog);
-        }
-    }
-
-    lenResult = rowdata.length();
-    result = rowdata.detach();
-}
-
 void GraphResult::getLinkedResult(unsigned & count, byte * * & ret)
 {
     unsigned max = rows.ordinality();
@@ -1432,7 +1387,7 @@ IThorChildGraph * EclGraph::resolveChildQuery(unsigned subgraphId)
 
 
 //NB: resolveLocalQuery (unlike children) can't link otherwise you get a cicular dependency.
-ILocalGraph * EclGraph::resolveLocalQuery(unsigned subgraphId)
+IEclGraphResults * EclGraph::resolveLocalQuery(unsigned subgraphId)
 {
     return idToGraph(subgraphId);
 }
@@ -1830,7 +1785,7 @@ IThorChildGraph * EclAgent::resolveChildQuery(__int64 subgraphId, IHThorArg * co
     throwUnexpected();
 }
 
-ILocalGraph * EclAgent::resolveLocalQuery(__int64 activityId) 
+IEclGraphResults * EclAgent::resolveLocalQuery(__int64 activityId)
 { 
     throwUnexpected();
 }

+ 0 - 4
ecl/hqlcpp/hqlcatom.cpp

@@ -283,7 +283,6 @@ _ATOM freeExceptionAtom;
 _ATOM getBytesFromBuilderAtom;
 _ATOM getChildQueryDictionaryResultAtom;
 _ATOM getChildQueryLinkedResultAtom;
-_ATOM getChildQueryResultAtom;
 _ATOM getClusterSizeAtom;
 _ATOM getDatasetHashAtom;
 _ATOM getECLAtom;
@@ -299,7 +298,6 @@ _ATOM getLocalDictionaryResultAtom;
 _ATOM getLocalFailMessageAtom;
 _ATOM getLocalFilePositionAtom;
 _ATOM getLocalLinkedResultAtom;
-_ATOM getLocalResultAtom;
 _ATOM getMatchedAtom;
 _ATOM getMatchLengthAtom;
 _ATOM getMatchPositionAtom;
@@ -1005,7 +1003,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM-1)
     MAKEATOM(getBytesFromBuilder);
     MAKEATOM(getChildQueryDictionaryResult);
     MAKEATOM(getChildQueryLinkedResult);
-    MAKEATOM(getChildQueryResult);
     MAKEATOM(getClusterSize);
     MAKEATOM(getDatasetHash);
     MAKEATOM(getECL);
@@ -1021,7 +1018,6 @@ MODULE_INIT(INIT_PRIORITY_HQLATOM-1)
     MAKEATOM(getLocalFailMessage);
     MAKEATOM(getLocalFilePosition);
     MAKEATOM(getLocalLinkedResult);
-    MAKEATOM(getLocalResult);
     MAKEATOM(getMatched);
     MAKEATOM(getMatchLength);
     MAKEATOM(getMatchPosition);

+ 0 - 2
ecl/hqlcpp/hqlcatom.hpp

@@ -284,7 +284,6 @@ extern _ATOM getBytesFromBuilderAtom;
 extern _ATOM getClusterSizeAtom;
 extern _ATOM getChildQueryDictionaryResultAtom;
 extern _ATOM getChildQueryLinkedResultAtom;
-extern _ATOM getChildQueryResultAtom;
 extern _ATOM getDatasetHashAtom;
 extern _ATOM getECLAtom;
 extern _ATOM getEnvAtom;
@@ -299,7 +298,6 @@ extern _ATOM getLocalDictionaryResultAtom;
 extern _ATOM getLocalFailMessageAtom;
 extern _ATOM getLocalFilePositionAtom;
 extern _ATOM getLocalLinkedResultAtom;
-extern _ATOM getLocalResultAtom;
 extern _ATOM getMatchedAtom;
 extern _ATOM getMatchLengthAtom;
 extern _ATOM getMatchPositionAtom;

+ 1 - 1
ecl/hqlcpp/hqlcpp.ipp

@@ -1560,7 +1560,7 @@ public:
     IHqlExpression * doBuildRegexFindInstance(BuildCtx & ctx, IHqlExpression * compiled, IHqlExpression * search, bool cloneSearch);
     
     IHqlExpression * doCreateGraphLookup(BuildCtx & declarectx, BuildCtx & resolvectx, unique_id_t id, const char * activity, bool isChild);
-    IHqlExpression * buildGetLocalResult(BuildCtx & ctx, IHqlExpression * expr, bool preferLinkedRows);
+    IHqlExpression * buildGetLocalResult(BuildCtx & ctx, IHqlExpression * expr);
 
     IHqlExpression * queryOptimizedExists(BuildCtx & ctx, IHqlExpression * expr, IHqlExpression * dataset);
     void doBuildAssignAggregateLoop(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr, IHqlExpression * dataset, IHqlExpression * doneFirstVar);

+ 7 - 12
ecl/hqlcpp/hqlcppds.cpp

@@ -4903,12 +4903,12 @@ IReferenceSelector * HqlCppTranslator::buildDatasetSelectMap(BuildCtx & ctx, IHq
 
 //---------------------------------------------------------------------------
 
-IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpression * expr, bool preferLinkedRows)
+IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpression * expr)
 {
     IHqlExpression * graphId = expr->queryChild(1);
     IHqlExpression * resultNum = expr->queryChild(2);
     Linked<ITypeInfo> exprType = queryUnqualifiedType(expr->queryType());
-    if (preferLinkedRows && !hasLinkCountedModifier(exprType))
+    if (!hasLinkCountedModifier(exprType))
         exprType.setown(makeAttributeModifier(LINK(exprType), getLinkCountedAttr()));
 
     if (expr->hasProperty(externalAtom))
@@ -4930,9 +4930,7 @@ IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpre
         args.append(*LINK(resultNum));
         if (expr->isDictionary())
             return bindFunctionCall(getChildQueryDictionaryResultAtom, args, exprType);
-        if (preferLinkedRows)
-            return bindFunctionCall(getChildQueryLinkedResultAtom, args, exprType);
-        return bindFunctionCall(getChildQueryResultAtom, args, exprType);
+        return bindFunctionCall(getChildQueryLinkedResultAtom, args, exprType);
     }
 
     assertex(activeActivities.ordinality());
@@ -4954,9 +4952,7 @@ IHqlExpression * HqlCppTranslator::buildGetLocalResult(BuildCtx & ctx, IHqlExpre
     args.append(*LINK(resultNum));
     if (expr->isDictionary())
         return bindFunctionCall(getLocalDictionaryResultAtom, args, exprType);
-    if (preferLinkedRows)
-        return bindFunctionCall(getLocalLinkedResultAtom, args, exprType);
-    return bindFunctionCall(getLocalResultAtom, args, exprType);
+    return bindFunctionCall(getLocalLinkedResultAtom, args, exprType);
 }
 
 void HqlCppTranslator::doBuildAssignGetGraphResult(BuildCtx & ctx, const CHqlBoundTarget & target, IHqlExpression * expr)
@@ -4964,10 +4960,9 @@ void HqlCppTranslator::doBuildAssignGetGraphResult(BuildCtx & ctx, const CHqlBou
     if (expr->hasProperty(_streaming_Atom))
         throwError(HQLERR_LoopTooComplexForParallel);
 
-    bool isTargetLinkCounted = hasLinkCountedModifier(target.queryType());
     if (expr->hasProperty(externalAtom))
     {
-        OwnedHqlExpr call = buildGetLocalResult(ctx, expr, isTargetLinkCounted);
+        OwnedHqlExpr call = buildGetLocalResult(ctx, expr);
         buildExprAssign(ctx, target, call);
         return;
     }
@@ -4982,7 +4977,7 @@ void HqlCppTranslator::doBuildAssignGetGraphResult(BuildCtx & ctx, const CHqlBou
         return;
     }
 
-    OwnedHqlExpr call = buildGetLocalResult(ctx, expr, isTargetLinkCounted);
+    OwnedHqlExpr call = buildGetLocalResult(ctx, expr);
     buildExprAssign(ctx, target, call);
 }
 
@@ -5002,7 +4997,7 @@ void HqlCppTranslator::doBuildExprGetGraphResult(BuildCtx & ctx, IHqlExpression
         }
     }
 
-    OwnedHqlExpr call = buildGetLocalResult(ctx, expr, true);
+    OwnedHqlExpr call = buildGetLocalResult(ctx, expr);
     switch (expr->queryType()->getTypeCode())
     {
     case type_row:

+ 0 - 2
ecl/hqlcpp/hqlcppsys.ecl

@@ -591,7 +591,6 @@ const char * cppSystemText[]  = {
     "   executeGraph(const varstring graph, boolean realThor, unsigned4 lenExtract, row parentExtract) : ctxmethod,entrypoint='executeGraph';",
     "   executeChildQueryInstance(unsigned4 lenExtract, row parentExtract)  : method,entrypoint='execute';",
     "   evaluateChildQueryInstance(unsigned4 lenExtract, row parentExtract) : method,entrypoint='evaluate';",       // actually returns something el
-    "   dataset getChildQueryResult(unsigned4 id)   : method,pure,entrypoint='getResult';",
     "   _linkcounted_ dataset getChildQueryLinkedResult(unsigned4 id)   : method,allocator(false),pure,entrypoint='getLinkedResult';",
     "   _linkcounted_ dictionary getChildQueryDictionaryResult(unsigned4 id)   : method,allocator(false),pure,entrypoint='getDictionaryResult';",
     
@@ -748,7 +747,6 @@ const char * cppSystemText[]  = {
     "   getBytesFromBuilder() : omethod,entrypoint='getbytes';", 
     "   unsigned integer4 getClusterSize() : ctxmethod, entrypoint='getNodes';",
 
-    "   dataset getLocalResult(unsigned4 id) :  method,pure,entrypoint='getResult';",
     "   _linkcounted_ dataset getLocalLinkedResult(unsigned4 id) : method,allocator(false),pure,entrypoint='getLinkedResult';",
     "   linkcounted dictionary getLocalDictionaryResult(unsigned4 id) : method,allocator(false),pure,entrypoint='getDictionaryResult';",
     "   unsigned4 getGraphLoopCounter() : ctxmethod,entrypoint='getGraphLoopCounter';",

+ 2 - 2
ecl/hqlcpp/hqlinline.cpp

@@ -1433,13 +1433,13 @@ IHqlExpression * HqlCppTranslator::doCreateGraphLookup(BuildCtx & declarectx, Bu
     }
     else
     {
-        //NB: resolveLocalQuery (unlike children) can't link otherwise you get a cicular dependency.
+        //NB: resolveLocalQuery (unlike children) can't link otherwise you get a circular dependency.
         appendUniqueId(var.append("graph"), id);
         OwnedHqlExpr memberExpr = createQuoted(var, makeBoolType());
         if (declarectx.queryMatchExpr(memberExpr))
             return memberExpr.getClear();
     
-        s.clear().append("ILocalGraph * ").append(var).append(";");
+        s.clear().append("IEclGraphResults * ").append(var).append(";");
         declarectx.addQuoted(s);
         declarectx.associateExpr(memberExpr, memberExpr);
 

+ 2 - 2
ecl/hthor/hthor.cpp

@@ -235,9 +235,9 @@ void CHThorActivityBase::updateProgressForOther(IWUGraphProgress &progress, unsi
     edge.setPropInt64("@slaves", 1);
 }
 
-ILocalGraphEx * CHThorActivityBase::resolveLocalQuery(__int64 graphId)
+ILocalEclGraphResults * CHThorActivityBase::resolveLocalQuery(__int64 graphId)
 {
-    return static_cast<ILocalGraphEx *>(agent.queryCodeContext()->resolveLocalQuery(graphId));
+    return static_cast<ILocalEclGraphResults *>(agent.queryCodeContext()->resolveLocalQuery(graphId));
 }
 
 IException * CHThorActivityBase::makeWrappedException(IException * e) const

+ 7 - 7
ecl/hthor/hthor.ipp

@@ -233,7 +233,7 @@ protected:
     void updateProgressForOther(IWUGraphProgress &progress, unsigned otherActivity, unsigned otherSubgraph, unsigned whichOutput, unsigned __int64 numProcessed) const;
 
 protected:
-    ILocalGraphEx * resolveLocalQuery(__int64 graphId);
+    ILocalEclGraphResults * resolveLocalQuery(__int64 graphId);
 };
 
 class CHThorSimpleActivityBase : public CHThorActivityBase
@@ -2400,7 +2400,7 @@ class CHThorLocalResultReadActivity : public CHThorSimpleActivityBase
     IHThorLocalResultReadArg &helper;
     IRecordSize * physicalRecordSize;
     IHThorGraphResult * result;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
     unsigned curRow;
     bool grouped;
 
@@ -2418,7 +2418,7 @@ public:
 class CHThorLocalResultWriteActivity : public CHThorActivityBase
 {
     IHThorLocalResultWriteArg &helper;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
 
 public:
     IMPLEMENT_SINKACTIVITY;
@@ -2431,7 +2431,7 @@ public:
 class CHThorDictionaryResultWriteActivity : public CHThorActivityBase
 {
     IHThorDictionaryResultWriteArg &helper;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
 
 public:
     IMPLEMENT_SINKACTIVITY;
@@ -2444,7 +2444,7 @@ public:
 class CHThorLocalResultSpillActivity : public CHThorSimpleActivityBase
 {
     IHThorLocalResultSpillArg &helper;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
     IHThorGraphResult * result;
     bool nullPending;
 
@@ -2533,7 +2533,7 @@ protected:
 class CHThorGraphLoopResultReadActivity : public CHThorSimpleActivityBase
 {
     IHThorGraphLoopResultReadArg * helper;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
     IRecordSize * physicalRecordSize;
     IHThorGraphResult * result;
     unsigned curRow;
@@ -2555,7 +2555,7 @@ public:
 class CHThorGraphLoopResultWriteActivity : public CHThorActivityBase
 {
     IHThorGraphLoopResultWriteArg &helper;
-    ILocalGraphEx * graph;
+    ILocalEclGraphResults * graph;
 
 public:
     IMPLEMENT_SINKACTIVITY;

+ 1 - 1
roxie/ccd/ccdcontext.cpp

@@ -1077,7 +1077,7 @@ public:
         return LINK(queryChildGraph((unsigned) activityId)->queryChildGraph());
     }
 
-    virtual ILocalGraph * resolveLocalQuery(__int64 id)
+    virtual IEclGraphResults * resolveLocalQuery(__int64 id)
     {
         return queryChildGraph((unsigned) id)->queryLocalGraph();
     }

+ 1 - 1
roxie/ccd/ccdquery.hpp

@@ -62,7 +62,7 @@ interface IActivityGraph : extends IInterface
     virtual void noteException(IException *E) = 0;
     virtual void checkAbort() = 0;
     virtual IThorChildGraph * queryChildGraph() = 0;
-    virtual ILocalGraph * queryLocalGraph() = 0;
+    virtual IEclGraphResults * queryLocalGraph() = 0;
     virtual IRoxieServerChildGraph * queryLoopGraph() = 0;
     virtual IRoxieServerChildGraph * createGraphLoopInstance(unsigned loopCounter, unsigned parentExtractSize, const byte * parentExtract, const IRoxieContextLogger &logctx) = 0;
     virtual const char *queryName() const = 0;

+ 4 - 107
roxie/ccd/ccdserver.cpp

@@ -5280,7 +5280,7 @@ IRoxieServerActivityFactory *createRoxieServerWorkUnitReadActivityFactory(unsign
 
 //=================================================================================
 
-interface ILocalGraphEx : public ILocalGraph
+interface ILocalGraphEx : public IEclGraphResults
 {
 public:
     virtual void setResult(unsigned id, IGraphResult * result) = 0;
@@ -24794,10 +24794,6 @@ public:
     {
         return select(id).createIterator();
     }
-    virtual void getResult(unsigned & lenResult, void * & result, unsigned id)
-    {
-        throwUnexpected(); // Only required in legacy thor implementation
-    }
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id)
     {
         select(id).getLinkedResult(count, ret);
@@ -24941,7 +24937,7 @@ protected:
     class ActivityGraphCodeContext : public IndirectCodeContext
     {
     public:
-        virtual ILocalGraph * resolveLocalQuery(__int64 activityId)
+        virtual IEclGraphResults * resolveLocalQuery(__int64 activityId)
         {
             if ((unsigned) activityId == container->queryId())
                 return container;
@@ -25124,7 +25120,7 @@ public:
         return this;
     }
 
-    virtual ILocalGraph * queryLocalGraph()
+    virtual IEclGraphResults * queryLocalGraph()
     {
         return this;
     }
@@ -25269,10 +25265,6 @@ public:
         doExecute(parentExtractSize, parentExtract);
         return LINK(results);
     }
-    virtual void getResult(size32_t & retSize, void * & ret, unsigned id)
-    {
-        results->getResult(retSize, ret, id);
-    }
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id)
     {
         results->getLinkedResult(count, ret, id);
@@ -25535,7 +25527,7 @@ public:
     virtual void noteException(IException *E) { throwUnexpected(); }
     virtual void checkAbort() { throwUnexpected(); }
     virtual IThorChildGraph * queryChildGraph() { throwUnexpected(); }
-    virtual ILocalGraph * queryLocalGraph() { throwUnexpected(); }
+    virtual IEclGraphResults * queryLocalGraph() { throwUnexpected(); }
     virtual IRoxieServerChildGraph * queryLoopGraph() { throwUnexpected(); }
 
     virtual void onCreate(IRoxieSlaveContext *_ctx, IHThorArg *_colocalParent) 
@@ -25743,75 +25735,6 @@ public:
 bool MergeActivityTest::isDedup = false;
 extern "C" IHThorArg * mergeActivityTestFactory() { return new MergeActivityTest; }
 
-struct PrefetchProjectActivityTest : public ccdserver_hqlhelper::CThorPrefetchProjectArg {
-    virtual IOutputMetaData * queryOutputMeta()
-    {
-        return &testMeta;
-    }
-    virtual void onCreate(ICodeContext * _ctx, IHThorArg *, MemoryBuffer * in) {
-        ctx = _ctx;
-        child8.setown(ctx->resolveChildQuery(8,this));
-    }
-//  mutable rtlRowBuilder ex39R4;
-    Owned<IThorChildGraph> child8;
-    virtual IThorChildGraph *queryChild() { return child8; }
-    virtual bool preTransform(rtlRowBuilder & extract, const void * _left, unsigned __int64 count) {
-        const unsigned char * left = (const unsigned char *) _left;
-        extract.ensureAvailable(1);
-        memcpy((char *)(extract.getbytes() + 0),(char *)(left + 0),1);
-        // child8->execute(5,ex39R4.getbytes());
-        return true;
-    }
-    virtual size32_t transform(ARowBuilder & _self, const void * _left, IEclGraphResults * results, unsigned __int64 count) {
-        unsigned char * self = (unsigned char *) _self.getSelf();
-        const unsigned char * left = (const unsigned char *) _left;
-        memcpy((char *)(self + 0),(char *)(left + 0),10);
-        rtlDataAttr v79R4;
-        unsigned int v89R4;
-        results->getResult(v89R4,v79R4.refdata(),0);
-        memcpy(self + count - 1, ((unsigned char *)v79R4.getbytes() + count - 1), 1);
-        return 10;
-    }
-};
-extern "C" IHThorArg * prefetchProjectActivityTestFactory() { return new PrefetchProjectActivityTest; }
-
-struct InlineTableActivityTest : public ccdserver_hqlhelper::CThorInlineTableArg {
-    virtual IOutputMetaData * queryOutputMeta()
-    {
-        return &testMeta;
-    }
-    virtual size32_t getRow(ARowBuilder & _self, __uint64 row) {
-        unsigned char * self = (unsigned char *) _self.getSelf();
-        switch (row) {
-            case 0: {
-                memcpy((char *)(self + 0),"1234567890",10);
-                return 10;
-            }
-        }
-        return 0;
-    }
-    virtual __uint64 numRows() {
-        return 1;
-    }
-};
-extern "C" IHThorArg * inlineTableActivityTestFactory() { return new InlineTableActivityTest; }
-
-struct SelectNActivityTest : public ccdserver_hqlhelper::CThorSelectNArg {
-    virtual IOutputMetaData * queryOutputMeta() 
-    {
-        return &testMeta; 
-    }
-    virtual size32_t createDefault(ARowBuilder & _self) { memset(_self.getSelf(), ' ', 10); return 10; }
-    virtual unsigned __int64 getRowToSelect() { return 1; }
-};
-extern "C" IHThorArg * selectNActivityTestFactory() { return new SelectNActivityTest; }
-
-struct LocalResultActivityTest : public ccdserver_hqlhelper::CThorLocalResultWriteArg {
-    virtual unsigned querySequence() { return 0; }
-    virtual bool usedOutsideGraph() { return true; }
-};
-extern "C" IHThorArg * localResultActivityTestFactory() { return new LocalResultActivityTest; }
-
 class CcdServerTest : public CppUnit::TestFixture  
 {
     CPPUNIT_TEST_SUITE(CcdServerTest);
@@ -25821,7 +25744,6 @@ class CcdServerTest : public CppUnit::TestFixture
         CPPUNIT_TEST(testQuickSort);
         CPPUNIT_TEST(testMerge);
         CPPUNIT_TEST(testMergeDedup);
-        CPPUNIT_TEST(testPrefetchProject);
         CPPUNIT_TEST(testMiscellaneous);
         CPPUNIT_TEST(testCleanup);
     CPPUNIT_TEST_SUITE_END();
@@ -26132,31 +26054,6 @@ protected:
         DBGLOG("testMergeDedup done");
     }
 
-    void testPrefetchProject()
-    {
-        DBGLOG("testPrefetchProject");
-        init();
-        Owned <IRoxieServerActivityFactory> factory = createRoxieServerPrefetchProjectActivityFactory(1, 1, *queryFactory, prefetchProjectActivityTestFactory, TAKprefetchproject);
-        Owned<ActivityArray> childGraph = new ActivityArray(false, false, false, false);
-        IRoxieServerActivityFactory *ttf = createRoxieServerInlineTableActivityFactory(2, 1, *queryFactory, inlineTableActivityTestFactory, TAKinlinetable);
-        IRoxieServerActivityFactory *snf = createRoxieServerSelectNActivityFactory(3, 1, *queryFactory, selectNActivityTestFactory, TAKselectn);
-        IRoxieServerActivityFactory *lrf = createRoxieServerLocalResultWriteActivityFactory(4, 1, *queryFactory, localResultActivityTestFactory, TAKlocalresultwrite, 0, 8, true);
-        childGraph->append(*ttf);
-        childGraph->append(*snf);
-        snf->setInput(0,0,0);
-        childGraph->append(*lrf);
-        lrf->setInput(0,1,0);
-        factory->addChildQuery(8, childGraph.getLink());
-        factory->setInput(0,0,0);
-        Owned <IRoxieServerActivity> activity = factory->createActivity(NULL);
-        const char * test[] = { NULL, NULL };
-        const char * test1in[] = { "aaaaaaaaaa", "aaaaaaaaaa", "aaaaaaaaaa","aaaaaaaaaa", "aaaaaaaaaa", NULL, NULL };
-        const char * test1out[] = { "1aaaaaaaaa", "a2aaaaaaaa", "aa3aaaaaaa", "aaa4aaaaaa", "aaaa5aaaaa", NULL, NULL };
-        testActivity(activity, test1in, NULL, test1out);
-        testActivity(activity, test, NULL, test);
-        DBGLOG("testPrefetchProject done");
-    }
-
     void testMiscellaneous()
     {
         DBGLOG("sizeof(CriticalSection)=%u", (unsigned) sizeof(CriticalSection));

+ 4 - 12
rtl/include/eclhelper.hpp

@@ -1,5 +1,5 @@
 /*##############################################################################
-#    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems.
+#    HPCC SYSTEMS software Copyright (C) 2013 HPCC Systems.
 #
 #    Licensed under the Apache License, Version 2.0 (the "License");
 #    you may not use this file except in compliance with the License.
@@ -39,8 +39,8 @@ if the supplied pointer was not from the roxiemem heap. Usually an OwnedRoxieStr
 
 //Should be incremented whenever the virtuals in the context or a helper are changed, so
 //that a work unit can't be rerun.  Try as hard as possible to retain compatibility.
-#define ACTIVITY_INTERFACE_VERSION      144
-#define MIN_ACTIVITY_INTERFACE_VERSION  144             //minimum value that is compatible with current interface - without using selectInterface
+#define ACTIVITY_INTERFACE_VERSION      145
+#define MIN_ACTIVITY_INTERFACE_VERSION  145             //minimum value that is compatible with current interface - without using selectInterface
 
 typedef unsigned char byte;
 
@@ -478,7 +478,6 @@ interface IResourceContext
 //Provided by engine=>can extent
 interface IEclGraphResults : public IInterface
 {
-    virtual void getResult(size32_t & retSize, void * & ret, unsigned id) = 0;
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id) = 0;
     virtual void getDictionaryResult(size32_t & tcount, byte * * & tgt, unsigned id) = 0;
 };
@@ -490,13 +489,6 @@ interface IThorChildGraph : public IInterface
     virtual IEclGraphResults * evaluate(unsigned parentExtractSize, const byte * parentExtract) = 0;
 };
 
-interface ILocalGraph : public IInterface
-{
-    virtual void getResult(unsigned & len, void * & data, unsigned id) = 0;
-    virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id) = 0;
-    virtual void getDictionaryResult(size32_t & tcount, byte * * & tgt, unsigned id) = 0;
-};
-
 //NB: New methods must always be added at the end of this interface to retain backward compatibility
 interface IContextLogger;
 interface IDebuggableContext;
@@ -576,7 +568,7 @@ interface ICodeContext : public IResourceContext
     virtual void executeGraph(const char * graphName, bool realThor, size32_t parentExtractSize, const void * parentExtract) = 0;
     virtual unsigned getGraphLoopCounter() const { return 0; }
     virtual IThorChildGraph * resolveChildQuery(__int64 activityId, IHThorArg * colocal) = 0;
-    virtual ILocalGraph * resolveLocalQuery(__int64 activityId) { return NULL; }
+    virtual IEclGraphResults * resolveLocalQuery(__int64 activityId) { return NULL; }
 
     // Logging etc
 

+ 1 - 7
thorlcr/graph/thgraph.cpp

@@ -1868,13 +1868,7 @@ IThorResult *CGraphBase::createGraphLoopResult(CActivityBase &activity, IRowInte
     return graphLoopResults->createResult(activity, rowIf, distributed, spillPriority);
 }
 
-// ILocalGraph
-void CGraphBase::getResult(size32_t & len, void * & data, unsigned id)
-{
-    Owned<IThorResult> result = getResult(id, true); // will get collated distributed result
-    result->getResult(len, data);
-}
-
+// IEclGraphResults
 void CGraphBase::getDictionaryResult(unsigned & count, byte * * & ret, unsigned id)
 {
     Owned<IThorResult> result = getResult(id, true); // will get collated distributed result

+ 3 - 10
thorlcr/graph/thgraph.hpp

@@ -119,7 +119,6 @@ interface IThorResult : extends IInterface
     virtual CActivityBase *queryActivity() = 0;
     virtual bool isDistributed() const = 0;
     virtual void serialize(MemoryBuffer &mb) = 0;
-    virtual void getResult(size32_t & retSize, void * & ret) = 0;
     virtual void getLinkedResult(unsigned & count, byte * * & ret) = 0;
 };
 
@@ -421,7 +420,7 @@ interface IGraphCallback
 
 class CJobBase;
 interface IPropertyTree;
-class graph_decl CGraphBase : public CInterface, implements ILocalGraph, implements IThorChildGraph, implements IExceptionHandler
+class graph_decl CGraphBase : public CInterface, implements IEclGraphResults, implements IThorChildGraph, implements IExceptionHandler
 {
     mutable CriticalSection crit;
     CriticalSection evaluateCrit;
@@ -499,7 +498,7 @@ class graph_decl CGraphBase : public CInterface, implements ILocalGraph, impleme
         virtual char *getPlatform() { return ctx->getPlatform(); }
         virtual char *getEnv(const char *name, const char *defaultValue) const { return ctx->getEnv(name, defaultValue); }
         virtual char *getOS() { return ctx->getOS(); }
-        virtual ILocalGraph * resolveLocalQuery(__int64 activityId) { return ctx->resolveLocalQuery(activityId); }
+        virtual IEclGraphResults * resolveLocalQuery(__int64 activityId) { return ctx->resolveLocalQuery(activityId); }
         virtual char *getEnv(const char *name, const char *defaultValue) { return ctx->getEnv(name, defaultValue); }
         virtual unsigned logString(const char * text) const { return ctx->logString(text); }
         virtual const IContextLogger &queryContextLogger() const { return ctx->queryContextLogger(); }
@@ -740,8 +739,7 @@ public:
     virtual IThorResult *createResult(CActivityBase &activity, unsigned id, IRowInterfaces *rowIf, bool distributed, unsigned spillPriority=SPILL_PRIORITY_RESULT);
     virtual IThorResult *createGraphLoopResult(CActivityBase &activity, IRowInterfaces *rowIf, bool distributed, unsigned spillPriority=SPILL_PRIORITY_RESULT);
 
-// ILocalGraph
-    virtual void getResult(size32_t & len, void * & data, unsigned id);
+// IEclGraphResults
     virtual void getDictionaryResult(unsigned & count, byte * * & ret, unsigned id);
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id);
 
@@ -1124,11 +1122,6 @@ public:
             results.append(*LINK(result));
     }
     virtual unsigned count() { return results.ordinality(); }
-    virtual void getResult(size32_t & retSize, void * & ret, unsigned id)
-    {
-        Owned<IThorResult> result = getResult(id, true);
-        result->getResult(retSize, ret);
-    }
     virtual void getLinkedResult(unsigned & count, byte * * & ret, unsigned id)
     {
         Owned<IThorResult> result = getResult(id, true);

+ 0 - 5
thorlcr/graph/thgraphmaster.cpp

@@ -1969,11 +1969,6 @@ public:
         ensure();
         result->serialize(mb);
     }
-    virtual void getResult(size32_t & retSize, void * & ret)
-    {
-        ensure();
-        return result->getResult(retSize, ret);
-    }
     virtual void getLinkedResult(unsigned & count, byte * * & ret)
     {
         ensure();

+ 2 - 2
thorlcr/thorcodectx/thcodectx.cpp

@@ -107,9 +107,9 @@ const char * CThorCodeContextBase::cloneVString(size32_t len, const char * str)
     return job.queryRowManager()->cloneVString(len, str);
 }
 
-ILocalGraph *CThorCodeContextBase::resolveLocalQuery(__int64 gid)
+IEclGraphResults *CThorCodeContextBase::resolveLocalQuery(__int64 gid)
 {
-    ILocalGraph *graph = job.getGraph((graph_id)gid);
+    IEclGraphResults *graph = job.getGraph((graph_id)gid);
     graph->Release(); // resolveLocalQuery doesn't own, can't otherwise will be circular ref.
     return graph;
 }

+ 1 - 1
thorlcr/thorcodectx/thcodectx.hpp

@@ -110,7 +110,7 @@ public:
     virtual IEngineRowAllocator * getRowAllocator(IOutputMetaData * meta, unsigned activityId) const;
     virtual const char *cloneVString(const char *str) const;
     virtual const char *cloneVString(size32_t len, const char *str) const;
-    virtual ILocalGraph *resolveLocalQuery(__int64 gid);
+    virtual IEclGraphResults *resolveLocalQuery(__int64 gid);
     virtual IThorChildGraph * resolveChildQuery(__int64 activityId, IHThorArg * colocal);
     virtual void getRowXML(size32_t & lenResult, char * & result, IOutputMetaData & info, const void * row, unsigned flags);
     virtual IConstWUResult *getExternalResult(const char * wuid, const char *name, unsigned sequence) { throwUnexpected(); }