浏览代码

HPCC-18010 Refactor eclhelper_base.hpp

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 年之前
父节点
当前提交
b02fbfabd1

+ 1 - 4
common/thorhelper/thorfile.cpp

@@ -25,10 +25,7 @@
 #include "rtlfield.hpp"
 #include "rtlds_imp.hpp"
 
-namespace thorfile
-{  // Make sure we can't clash with generated versions or version check mechanism fails.
 #include "eclhelper_base.hpp"
-}
 #include "thorcommon.ipp"
 
 void setExpiryTime(IPropertyTree & properties, unsigned expireDays)
@@ -37,7 +34,7 @@ void setExpiryTime(IPropertyTree & properties, unsigned expireDays)
 }
 
 
-class DiskWorkUnitReadArg : public thorfile::CThorDiskReadArg
+class DiskWorkUnitReadArg : public CThorDiskReadArg
 {
 public:
     DiskWorkUnitReadArg(const char * _filename, IHThorWorkunitReadArg * _wuRead) : filename(_filename), wuRead(_wuRead)

+ 2 - 4
common/thorhelper/thorsoapcall.cpp

@@ -734,8 +734,7 @@ public:
 
         rowProvider = _rowProvider;
         helper = rowProvider->queryActionHelper();
-        callHelper = rowProvider->queryCallHelper();  //MORE: This should not be done this way!! Should use extra as below.
-        helperExtra = static_cast<IHThorSoapCallExtra*>(helper->selectInterface(TAIsoapcallextra_1));
+        callHelper = rowProvider->queryCallHelper();
         flags = helper->getFlags();
         OwnedRoxieString s;
 
@@ -982,7 +981,7 @@ public:
         {
             size32_t lenText;
             rtlDataAttr text;
-            helperExtra->getLogText(lenText, text.refstr(), row);
+            helper->getLogText(lenText, text.refstr(), row);
             logctx.CTXLOG("%s: %.*s", wscCallTypeText(), lenText, text.getstr());
         }
     }
@@ -1036,7 +1035,6 @@ protected:
     IWSCRowProvider * rowProvider;
     IHThorWebServiceCallActionArg * helper;
     IHThorWebServiceCallArg *   callHelper;
-    IHThorWebServiceCallExtra * helperExtra;
     Linked<IEngineRowAllocator> outputAllocator;
     Owned<IException> error;
     UrlArray urlArray;

+ 1 - 1
common/thorhelper/thorstep.hpp

@@ -22,7 +22,7 @@
 
 //---------------------------------------------------------------------------
 
-//Can be extended, since it is only every implemented within the engines
+//Can be extended, since it is only ever implemented within the engines
 interface IInputSteppingMeta : public ISteppingMeta
 {
 //??virtual ISteppingMeta * querySteppingMeta() const = 0

+ 0 - 6
ecl/hqlcpp/hqlhtcpp.cpp

@@ -63,10 +63,7 @@
 #include "eclrtl_imp.hpp"
 #include "rtlfield.hpp"
 #include "rtlds_imp.hpp"
-namespace hqlhtcpp
-{  // Make sure we can't clash with generated versions or version check mechanism fails (if this dll was ever in the future linked in runtime)
 #include "eclhelper_base.hpp"
-}
 
 #include "ctfile.hpp"   // for KEYBUILD_MAXLENGTH
 
@@ -15674,10 +15671,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityLimit(BuildCtx & ctx, IHqlExpr
     ThorActivityKind kind = TAKlimit;
     const char * helper = "Limit";
     if (transform)
-    {
         kind = TAKcreaterowlimit;
-        helper = "CreateRowLimit";
-    }
     else if (expr->hasAttribute(skipAtom))
         kind = TAKskiplimit;
     Owned<ActivityInstance> instance = new ActivityInstance(*this, ctx, kind, expr, helper);

+ 3 - 11
ecl/hthor/hthor.cpp

@@ -3106,8 +3106,6 @@ const void * CHThorSkipCatchActivity::nextRow()
 
 CHThorOnFailLimitActivity::CHThorOnFailLimitActivity(IAgentContext &_agent, unsigned _activityId, unsigned _subgraphId, IHThorLimitArg &_arg, ThorActivityKind _kind) : CHThorSkipLimitActivity(_agent, _activityId, _subgraphId, _arg, _kind)
 {
-    transformExtra = static_cast<IHThorLimitTransformExtra *>(helper.selectInterface(TAIlimittransformextra_1));
-    assertex(transformExtra);
 }
 
 void CHThorOnFailLimitActivity::onLimitExceeded() 
@@ -3115,7 +3113,7 @@ void CHThorOnFailLimitActivity::onLimitExceeded()
     buffer->clear(); 
 
     RtlDynamicRowBuilder rowBuilder(rowAllocator);
-    size32_t newSize = transformExtra->transformOnLimitExceeded(rowBuilder);
+    size32_t newSize = helper.transformOnLimitExceeded(rowBuilder);
     if (newSize)
         buffer->insert(rowBuilder.finalizeRowClear(newSize));
 }
@@ -3854,15 +3852,9 @@ const void *CHThorGroupSortActivity::nextRow()
 
 void CHThorGroupSortActivity::createSorter()
 {
-    IHThorAlgorithm * algo = static_cast<IHThorAlgorithm *>(helper.selectInterface(TAIalgorithm_1));
-    if(!algo)
-    {
-        sorter.setown(new CHeapSorter(helper.queryCompare(), queryRowManager(), InitialSortElements, CommitStep));
-        return;
-    }
-    unsigned flags = algo->getAlgorithmFlags();
+    unsigned flags = helper.getAlgorithmFlags();
     sorterIsConst = ((flags & TAFconstant) != 0);
-    OwnedRoxieString algoname(algo->getAlgorithm());
+    OwnedRoxieString algoname(helper.getAlgorithm());
     if(!algoname)
     {
         if((flags & TAFunstable) != 0)

+ 0 - 3
ecl/hthor/hthor.ipp

@@ -820,9 +820,6 @@ public:
     
     virtual bool needsAllocator() const { return true; }    
     virtual void onLimitExceeded();
-
-private:
-    IHThorLimitTransformExtra * transformExtra;
 };
 
 class CHThorCatchActivity : public CHThorSteppableActivityBase

+ 4 - 2
ecl/hthor/hthorkey.cpp

@@ -404,7 +404,7 @@ CHThorIndexReadActivityBase::CHThorIndexReadActivityBase(IAgentContext &_agent,
     seeks = 0;
     scans = 0;
     helper.setCallback(&callback);
-    limitTransformExtra = static_cast<IHThorSourceLimitTransformExtra *>(helper.selectInterface(TAIsourcelimittransformextra_1));
+    limitTransformExtra = nullptr;
     gotLayoutTrans = false;
 }
 
@@ -803,7 +803,8 @@ protected:
 CHThorIndexReadActivity::CHThorIndexReadActivity(IAgentContext &_agent, unsigned _activityId, unsigned _subgraphId, IHThorIndexReadArg &_arg, ThorActivityKind _kind, IDistributedFile * _df) 
     : CHThorIndexReadActivityBase(_agent, _activityId, _subgraphId, _arg, _kind, _df), helper(_arg)
 {
-    steppedExtra = static_cast<IHThorSteppedSourceExtra *>(helper.selectInterface(TAIsteppedsourceextra_1));
+    limitTransformExtra = &helper;
+    steppedExtra = helper.querySteppingExtra();
     needTransform = helper.needTransform();
     keyedLimit = (unsigned __int64)-1;
     rowLimit = (unsigned __int64)-1;
@@ -1122,6 +1123,7 @@ protected:
 
 CHThorIndexNormalizeActivity::CHThorIndexNormalizeActivity(IAgentContext &_agent, unsigned _activityId, unsigned _subgraphId, IHThorIndexNormalizeArg &_arg, ThorActivityKind _kind, IDistributedFile * _df) : CHThorIndexReadActivityBase(_agent, _activityId, _subgraphId, _arg, _kind, _df), helper(_arg), outBuilder(NULL)
 {
+    limitTransformExtra = &helper;
     keyedLimit = (unsigned __int64)-1;
     skipLimitReached = false;
     keyedProcessed = 0;

+ 10 - 21
roxie/ccd/ccdactivities.cpp

@@ -3887,8 +3887,7 @@ ISlaveActivityFactory *createRoxieIndexNormalizeActivityFactory(IPropertyTree &_
 class CRoxieIndexCountActivity : public CRoxieIndexActivity
 {
 protected:
-    IHThorCompoundCountExtra * countHelper;
-    IHThorSourceCountLimit * limitHelper;
+    IHThorIndexCountArg * countHelper;
     unsigned __int64 choosenLimit;
     unsigned __int64 rowLimit;
     unsigned __int64 keyedLimit;
@@ -3899,16 +3898,10 @@ public:
     {
         onCreate();
         countHelper = (IHThorIndexCountArg *) basehelper;
-        limitHelper = static_cast<IHThorSourceCountLimit *>(basehelper->selectInterface(TAIsourcecountlimit_1));
         assertex(!resent);
         choosenLimit = countHelper->getChooseNLimit();
-        if (limitHelper)
-        {
-            rowLimit = limitHelper->getRowLimit();
-            keyedLimit = limitHelper->getKeyedLimit();
-        }
-        else
-            rowLimit = keyedLimit = (unsigned __int64) -1;
+        rowLimit = countHelper->getRowLimit();
+        keyedLimit = countHelper->getKeyedLimit();
     }
 
     virtual StringBuffer &toString(StringBuffer &ret) const
@@ -4299,12 +4292,11 @@ public:
         : CSlaveActivityFactory(_graphNode, _subgraphId, _queryFactory, _helperFactory)
     {
         Owned<IHThorFetchBaseArg> helper = (IHThorFetchBaseArg *) helperFactory();
-        IHThorFetchContext * fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
-        bool variableFileName = allFilesDynamic || queryFactory.isDynamic() || ((fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
+        bool variableFileName = allFilesDynamic || queryFactory.isDynamic() || ((helper->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
         if (!variableFileName)
         {
-            bool isOpt = (fetchContext->getFetchFlags() & FFdatafileoptional) != 0;
-            OwnedRoxieString fname(fetchContext->getFileName());
+            bool isOpt = (helper->getFetchFlags() & FFdatafileoptional) != 0;
+            OwnedRoxieString fname(helper->getFileName());
             datafile.setown(_queryFactory.queryPackage().lookupFileName(fname, isOpt, true, true, _queryFactory.queryWorkUnit(), true));
             if (datafile)
                 fileArray.setown(datafile->getIFileIOArray(isOpt, queryFactory.queryChannel()));
@@ -4328,7 +4320,6 @@ class CRoxieFetchActivityBase : public CRoxieSlaveActivity
 {
 protected:
     IHThorFetchBaseArg *helper;
-    IHThorFetchContext * fetchContext;
     const CRoxieFetchActivityFactory *factory;
     Owned<IFileIO> rawFile;
     Owned<ISerialStream> rawStream;
@@ -4346,10 +4337,9 @@ public:
         : CRoxieSlaveActivity(_logctx, _packet, _hFactory, _aFactory), factory(_aFactory)
     {
         helper = (IHThorFetchBaseArg *) basehelper;
-        fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
         base = 0;
-        variableFileName = allFilesDynamic || basefactory->queryQueryFactory().isDynamic() || ((fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
-        isOpt = (fetchContext->getFetchFlags() & FFdatafileoptional) != 0;
+        variableFileName = allFilesDynamic || basefactory->queryQueryFactory().isDynamic() || ((helper->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
+        isOpt = (helper->getFetchFlags() & FFdatafileoptional) != 0;
         onCreate();
         inputData = (char *) serializedCreate.readDirect(0);
         inputLimit = inputData + (serializedCreate.length() - serializedCreate.getPos());
@@ -4358,7 +4348,7 @@ public:
 
     virtual const char *queryDynamicFileName() const
     {
-        return fetchContext->getFileName();
+        return helper->getFileName();
     }
 
     virtual void setVariableFileInfo()
@@ -4440,8 +4430,7 @@ public:
     CRoxieFetchActivity(SlaveContextLogger &_logctx, IRoxieQueryPacket *_packet, HelperFactory *_hFactory, const CRoxieFetchActivityFactory *_aFactory)
         : CRoxieFetchActivityBase(_logctx, _packet, _hFactory, _aFactory)
     {
-        IHThorFetchContext * fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
-        IOutputMetaData *diskMeta = fetchContext->queryDiskRecordSize();
+        IOutputMetaData *diskMeta = helper->queryDiskRecordSize();
         diskAllocator.setown(getRowAllocator(diskMeta, basefactory->queryId()));
         rowDeserializer.setown(diskMeta->createDiskDeserializer(queryContext->queryCodeContext(), basefactory->queryId()));
     }

+ 61 - 96
roxie/ccd/ccdserver.cpp

@@ -48,10 +48,7 @@
 #include "dautils.hpp"
 #include "ftbase.ipp"
 
-namespace ccdserver_hqlhelper
-{  // Make sure we can't clash with generated versions or version check mechanism fails.
 #include "eclhelper_base.hpp"
-}
 
 #include "ccd.hpp"
 #include "ccdserver.hpp"
@@ -8254,8 +8251,7 @@ public:
             if (sortAlgorithm == unknownSortAlgorithm)
             {
                 sorter.clear();
-                IHThorAlgorithm *sortMethod = static_cast<IHThorAlgorithm *>(helper.selectInterface(TAIalgorithm_1));
-                OwnedRoxieString algorithmName(sortMethod->getAlgorithm());
+                OwnedRoxieString algorithmName(helper.getAlgorithm());
                 sortAlgorithm = useAlgorithm(algorithmName, sortFlags);
                 sorter.setown(createSortAlgorithm(sortAlgorithm, compare, ctx->queryRowManager(), meta, ctx->queryCodeContext(), tempDirectory, activityId));
             }
@@ -8285,15 +8281,9 @@ public:
     {
         Owned<IHThorSortArg> sortHelper = (IHThorSortArg *) helperFactory();
         const char *algorithmName = NULL;
-        IHThorAlgorithm *sortMethod = static_cast<IHThorAlgorithm *>(sortHelper->selectInterface(TAIalgorithm_1));
-        if (sortMethod)
-        {
-            sortFlags = sortMethod->getAlgorithmFlags();
-            if (sortFlags & TAFconstant)
-                algorithmName = sortMethod->getAlgorithm();
-        }
-        else
-            sortFlags = TAFstable|TAFconstant;
+        sortFlags = sortHelper->getAlgorithmFlags();
+        if (sortFlags & TAFconstant)
+            algorithmName = sortHelper->getAlgorithm();
         bool forceSpill = _queryFactory.queryOptions().allSortsMaySpill || _graphNode.getPropBool("hint[@name='spill']/@value", false);
         if (forceSpill)
             sortFlags |= TAFspill;
@@ -15617,7 +15607,7 @@ public:
 
 //=================================================================================
 
-struct GraphOutputSplitterArg : public ccdserver_hqlhelper::CThorSplitArg 
+struct GraphOutputSplitterArg : public CThorSplitArg
 {
 public:
     virtual unsigned numBranches()
@@ -19625,19 +19615,17 @@ IRoxieServerActivityFactory *createRoxieServerLimitActivityFactory(unsigned _id,
 class CRoxieServerSkipLimitActivity : public CRoxieServerLimitActivity
 {
     ConstPointerArray buff;
-    bool started;
-    unsigned index;
-    IHThorLimitTransformExtra * transformExtra;
+    bool started = false;
+    unsigned index = 0;
+    bool isFail = false;
 
 public:
     CRoxieServerSkipLimitActivity(IRoxieSlaveContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager, bool _onFail)
         : CRoxieServerLimitActivity(_ctx, _factory, _probeManager)
     {
-        transformExtra = NULL;
         started = false;
         index = 0;
-        if (_onFail)
-            transformExtra = static_cast<IHThorLimitTransformExtra *>(helper.selectInterface(TAIlimittransformextra_1));
+        isFail = _onFail;
     }
 
     virtual void start(unsigned parentExtractSize, const byte *parentExtract, bool paused)
@@ -19692,11 +19680,11 @@ protected:
                 ReleaseRoxieRows(buff);
                 if (ctx->queryDebugContext())
                     ctx->queryDebugContext()->checkBreakpoint(DebugStateLimit, NULL, static_cast<IActivityBase *>(this));
-                if (transformExtra)
+                if (isFail)
                 {
                     ensureRowAllocator();
                     RtlDynamicRowBuilder rowBuilder(rowAllocator);
-                    size32_t outSize = transformExtra->transformOnLimitExceeded(rowBuilder);
+                    size32_t outSize = helper.transformOnLimitExceeded(rowBuilder);
                     if (outSize)
                         buff.append(rowBuilder.finalizeRowClear(outSize));
                 }
@@ -21422,6 +21410,7 @@ class CRoxieServerDiskReadBaseActivity : public CRoxieServerActivity, implements
 {
 protected:
     IHThorDiskReadBaseArg &helper;
+    IHThorSourceLimitTransformExtra * limitTransformExtra = nullptr;
     IHThorCompoundExtra * compoundHelper;
     RemoteActivityId remoteId;              // Note we copy it rather than reference
     Owned<CSkippableRemoteResultAdaptor> remote;
@@ -21665,7 +21654,6 @@ public:
     virtual const void * createLimitFailRow(bool isKeyed)
     {
         RtlDynamicRowBuilder rowBuilder(rowAllocator);
-        IHThorSourceLimitTransformExtra *limitTransformExtra = static_cast<IHThorSourceLimitTransformExtra *>(helper.selectInterface(TAIsourcelimittransformextra_1));
         assertex(limitTransformExtra);
         size32_t outSize = isKeyed ? limitTransformExtra->transformOnKeyedLimitExceeded(rowBuilder) : limitTransformExtra->transformOnLimitExceeded(rowBuilder);
         if (outSize)
@@ -21683,7 +21671,7 @@ public:
 
 class CRoxieServerDiskReadActivity : public CRoxieServerDiskReadBaseActivity
 {
-    IHThorCompoundReadExtra * readHelper;
+    IHThorDiskReadArg * readHelper;
     ConstPointerArray readrows;
     bool readAheadDone;
     bool eogPending;
@@ -21696,6 +21684,7 @@ public:
     {
         compoundHelper = (IHThorDiskReadArg *)&helper;
         readHelper = (IHThorDiskReadArg *)&helper;
+        limitTransformExtra = readHelper;
         readAheadDone = false;
         readIndex = 0;
         eogPending = false;
@@ -22146,6 +22135,7 @@ public:
     {
         compoundHelper = (IHThorDiskNormalizeArg *)&helper;
         normalizeHelper = (IHThorDiskNormalizeArg *)&helper;
+        limitTransformExtra = normalizeHelper;
         firstPending = true;
     }
 
@@ -22262,7 +22252,6 @@ class CRoxieServerDiskCountActivity : public CRoxieServerDiskAggregateBaseActivi
 {
     IHThorDiskCountArg & countHelper;
     unsigned __int64 choosenLimit;
-    IHThorSourceCountLimit *limitHelper;
 
     unsigned __int64 getSkippedCount()
     {
@@ -22273,10 +22262,9 @@ class CRoxieServerDiskCountActivity : public CRoxieServerDiskAggregateBaseActivi
             return 1;
         else
         {
-            assertex(limitHelper);
             if (traceLevel > 4)
                 DBGLOG("activityid = %d  isKeyed = %d  line = %d", activityId, isKeyed, __LINE__);
-            limitHelper->onLimitExceeded(); 
+            countHelper.onLimitExceeded();
             throwUnexpected(); // onLimitExceeded should always throw exception
         }
     }
@@ -22286,18 +22274,14 @@ public:
         : CRoxieServerDiskAggregateBaseActivity(_ctx, _factory, _probeManager, _remoteId, _numParts, _isLocal, _manager),
           countHelper((IHThorDiskCountArg &)basehelper)
     {
-        limitHelper = static_cast<IHThorSourceCountLimit *>(basehelper.selectInterface(TAIsourcecountlimit_1));
         choosenLimit = 0;
     }
 
     virtual void start(unsigned parentExtractSize, const byte *parentExtract, bool paused)
     {
         choosenLimit = countHelper.getChooseNLimit();
-        if (limitHelper)
-        {
-            rowLimit = limitHelper->getRowLimit();
-//          keyedLimit = limitHelper->getKeyedLimit(); // more - should there be one?
-        }
+        rowLimit = countHelper.getRowLimit();
+//      keyedLimit = countHelper->getKeyedLimit(); // more - should there be one?
         CRoxieServerDiskAggregateBaseActivity::start(parentExtractSize, parentExtract, paused);
     }
 
@@ -22707,7 +22691,7 @@ class CRoxieServerIndexActivity : public CRoxieServerActivity, implements IRoxie
 {
 protected:
     IHThorIndexReadBaseArg &indexHelper;
-    IHThorSteppedSourceExtra * steppedExtra;
+    IHThorSteppedSourceExtra *steppedExtra;
     Linked<IKeyArray> keySet;
     Linked<TranslatorArray> translators;
     CSkippableRemoteResultAdaptor remote;
@@ -22752,7 +22736,7 @@ public:
           isLocal(_isLocal) 
     {
         indexHelper.setCallback(&callback);
-        steppedExtra = static_cast<IHThorSteppedSourceExtra *>(indexHelper.selectInterface(TAIsteppedsourceextra_1));
+        steppedExtra = indexHelper.querySteppingExtra();
         variableFileName = allFilesDynamic || factory->queryQueryFactory().isDynamic() || ((indexHelper.getFlags() & (TIRvarfilename|TIRdynamicfilename)) != 0);
         variableInfoPending = false;
         isOpt = (indexHelper.getFlags() & TIRoptional) != 0;
@@ -22951,13 +22935,13 @@ public:
 
 class CRoxieServerIndexReadBaseActivity : public CRoxieServerIndexActivity
 {
-    IHThorSourceLimitTransformExtra * limitTransformExtra;
+protected:
+    IHThorSourceLimitTransformExtra * limitTransformExtra = nullptr;
 public:
     CRoxieServerIndexReadBaseActivity(IRoxieSlaveContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager, const RemoteActivityId &_remoteId,
         IKeyArray * _keySet, TranslatorArray *_translators, bool _sorted, bool _isLocal, bool _maySkip)
         : CRoxieServerIndexActivity(_ctx, _factory, _probeManager, _remoteId, _keySet, _translators, _sorted, _isLocal, _maySkip)
     {
-        limitTransformExtra = static_cast<IHThorSourceLimitTransformExtra *>(indexHelper.selectInterface(TAIsourcelimittransformextra_1));
     }
 
     virtual void reset()
@@ -22987,6 +22971,7 @@ protected:
     {
         ensureRowAllocator();
         RtlDynamicRowBuilder rowBuilder(rowAllocator);
+        assertex(limitTransformExtra);
         size32_t outSize = isKeyed ? limitTransformExtra->transformOnKeyedLimitExceeded(rowBuilder) : limitTransformExtra->transformOnLimitExceeded(rowBuilder);
         if (outSize)
             return rowBuilder.finalizeRowClear(outSize);
@@ -22998,7 +22983,7 @@ protected:
 class CRoxieServerIndexReadActivity : public CRoxieServerIndexReadBaseActivity, implements IIndexReadActivityInfo 
 {
 protected:
-    IHThorCompoundReadExtra & readHelper;
+    IHThorIndexReadArg & readHelper;
     ISteppingMeta *rawMeta = nullptr;
     CSteppingMeta steppingMeta;
     unsigned * seekSizes = nullptr;
@@ -23012,6 +22997,7 @@ public:
         : CRoxieServerIndexReadBaseActivity(_ctx, _factory, _probeManager, _remoteId, _keySet, _translators, _sorted, _isLocal, _maySkip),
           readHelper((IHThorIndexReadArg &)basehelper)
     {
+        limitTransformExtra = &readHelper;
         rawMeta = readHelper.queryRawSteppingMeta();
         unsigned flags = indexHelper.getFlags();
         optimizeSteppedPostFilter = (flags & TIRunfilteredtransform) != 0;
@@ -23314,9 +23300,7 @@ public:
 
 class CRoxieServerSimpleIndexReadActivity : public CRoxieServerActivity, implements IIndexReadActivityInfo 
 {
-    IHThorCompoundReadExtra & readHelper;
-    IHThorIndexReadBaseArg & indexHelper;
-    IHThorSourceLimitTransformExtra * limitTransformExtra;
+    IHThorIndexReadArg & indexHelper;
     IHThorSteppedSourceExtra * steppedExtra;
     bool eof;
     Linked<IKeyArray>keySet;
@@ -23391,7 +23375,6 @@ public:
     CRoxieServerSimpleIndexReadActivity(IRoxieSlaveContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager, const RemoteActivityId &_remoteId,
             IKeyArray *_keyArray, TranslatorArray *_translatorArray, bool _isLocal)
         : CRoxieServerActivity(_ctx, _factory, _probeManager),
-          readHelper((IHThorIndexReadArg &)basehelper), 
           indexHelper((IHThorIndexReadArg &)basehelper), 
           translators(_translatorArray),
           keySet(_keyArray),
@@ -23402,8 +23385,7 @@ public:
         keyedLimit = 0;
         chooseNLimit = 0;
         indexHelper.setCallback(&callback);
-        steppedExtra = static_cast<IHThorSteppedSourceExtra *>(indexHelper.selectInterface(TAIsteppedsourceextra_1));
-        limitTransformExtra = static_cast<IHThorSourceLimitTransformExtra *>(indexHelper.selectInterface(TAIsourcelimittransformextra_1));
+        steppedExtra = indexHelper.querySteppingExtra();
         unsigned flags = indexHelper.getFlags();
         variableFileName = allFilesDynamic || factory->queryQueryFactory().isDynamic() || ((flags & (TIRvarfilename|TIRdynamicfilename)) != 0);
         variableInfoPending = false;
@@ -23414,8 +23396,8 @@ public:
         rejected = 0;
         keyedCount = 0;
         eof = false;
-        rawMeta = readHelper.queryRawSteppingMeta();
-        projectedMeta = readHelper.queryProjectedSteppingMeta();
+        rawMeta = indexHelper.queryRawSteppingMeta();
+        projectedMeta = indexHelper.queryProjectedSteppingMeta();
         seekGEOffset = 0;
         seekSizes = NULL;
         if (rawMeta)
@@ -23428,7 +23410,7 @@ public:
             seekSizes[0] = fields[0].size;
             for (unsigned i=1; i < maxFields; i++)
                 seekSizes[i] = seekSizes[i-1] + fields[i].size;
-            bool hasPostFilter = readHelper.transformMayFilter() && optimizeSteppedPostFilter;
+            bool hasPostFilter = indexHelper.transformMayFilter() && optimizeSteppedPostFilter;
             if (projectedMeta)
                 steppingMeta.init(projectedMeta, hasPostFilter);
             else
@@ -23529,8 +23511,8 @@ public:
             if (variableInfoPending)
                 setVariableFileInfo();
 
-            rowLimit = (unsigned) readHelper.getRowLimit();
-            chooseNLimit = (unsigned) readHelper.getChooseNLimit();
+            rowLimit = (unsigned) indexHelper.getRowLimit();
+            chooseNLimit = (unsigned) indexHelper.getChooseNLimit();
 
             unsigned numParts = keyIndexSet->numParts();
             if (!numParts)
@@ -23561,7 +23543,7 @@ public:
             tlk->reset();
             callback.setManager(tlk);
 
-            keyedLimit = readHelper.getKeyedLimit();
+            keyedLimit = indexHelper.getKeyedLimit();
             if (keyedLimit != (unsigned __int64) -1)
             {
                 if ((indexHelper.getFlags() & TIRcountkeyedlimit) != 0)
@@ -23570,7 +23552,7 @@ public:
                     if (count > keyedLimit)
                     {
                         if ((indexHelper.getFlags() & (TIRkeyedlimitskips|TIRkeyedlimitcreates)) == 0)
-                            readHelper.onKeyedLimitExceeded(); 
+                            indexHelper.onKeyedLimitExceeded();
 
                         const void * ret = NULL;
                         if (indexHelper.getFlags() & TIRkeyedlimitcreates)
@@ -23600,7 +23582,7 @@ public:
             {
                 byte *temp = (byte *) alloca(seekSize);
                 RtlStaticRowBuilder rawBuilder(temp-seekGEOffset, seekGEOffset+seekSize);
-                readHelper.mapOutputToInput(rawBuilder, seek, numFields);// NOTE - weird interface to mapOutputToInput means that it STARTS writing at seekGEOffset...
+                indexHelper.mapOutputToInput(rawBuilder, seek, numFields);// NOTE - weird interface to mapOutputToInput means that it STARTS writing at seekGEOffset...
                 rawSeek = (byte *)temp;
             }
 #ifdef _DEBUG
@@ -23620,7 +23602,7 @@ public:
             keyedCount++;
             if (keyedCount > keyedLimit)
             {
-                readHelper.onKeyedLimitExceeded(); 
+                indexHelper.onKeyedLimitExceeded();
                 break;
             }
 
@@ -23640,14 +23622,14 @@ public:
             rowBuilder.ensureRow();
             try
             {
-                transformedSize = readHelper.transform(rowBuilder, keyRow);
+                transformedSize =indexHelper.transform(rowBuilder, keyRow);
                 //if the post filter causes a mismatch, and the stepping condition no longer matches
                 //then return a mismatch record - so the join code can start seeking on the other input.
                 if (transformedSize == 0 && optimizeSteppedPostFilter && stepExtra.returnMismatches())
                 {
                     if (memcmp(keyRow + seekGEOffset, originalRawSeek, seekSize) != 0)
                     {
-                        transformedSize = readHelper.unfilteredTransform(rowBuilder, keyRow);
+                        transformedSize = indexHelper.unfilteredTransform(rowBuilder, keyRow);
                         if (transformedSize != 0)
                             wasCompleteMatch = false;
                     }
@@ -23669,7 +23651,7 @@ public:
                     }
                     if (traceLevel > 4)
                         DBGLOG("activityid = %d  line = %d", activityId, __LINE__);
-                    readHelper.onLimitExceeded();
+                    indexHelper.onLimitExceeded();
                     break;
                 }
                 processed++;
@@ -23721,7 +23703,7 @@ protected:
     const void * createKeyedLimitOnFailRow()
     {
         RtlDynamicRowBuilder rowBuilder(rowAllocator);
-        size32_t outSize = limitTransformExtra->transformOnKeyedLimitExceeded(rowBuilder);
+        size32_t outSize = indexHelper.transformOnKeyedLimitExceeded(rowBuilder);
         if (outSize)
             return rowBuilder.finalizeRowClear(outSize);
         return NULL;
@@ -23898,8 +23880,7 @@ public:
 
 class CRoxieServerIndexCountActivity : public CRoxieServerIndexActivity
 {
-    IHThorCompoundCountExtra & countHelper;
-    IHThorSourceCountLimit * limitHelper;
+    IHThorIndexCountArg & countHelper;
     bool done;
 
 public:
@@ -23908,7 +23889,6 @@ public:
           countHelper((IHThorIndexCountArg &)basehelper),
           done(false)
     {
-        limitHelper = static_cast<IHThorSourceCountLimit *>(basehelper.selectInterface(TAIsourcecountlimit_1));
     }
 
     virtual bool needsAllocator() const { return true; }
@@ -23918,11 +23898,8 @@ public:
         done = false;
         CRoxieServerIndexActivity::start(parentExtractSize, parentExtract, paused);
         choosenLimit = countHelper.getChooseNLimit();
-        if (limitHelper)
-        {
-            rowLimit = limitHelper->getRowLimit();
-            keyedLimit = limitHelper->getKeyedLimit();
-        }
+        rowLimit = countHelper.getRowLimit();
+        keyedLimit = countHelper.getKeyedLimit();
         if (!paused)
             processAllKeys();
     }
@@ -23990,8 +23967,7 @@ public:
             }
             else
             {
-                assertex(limitHelper); // Should not be able to generate exception if there was not one...
-                limitHelper->onKeyedLimitExceeded();
+                countHelper.onKeyedLimitExceeded();
             }
         }
         else
@@ -24004,8 +23980,7 @@ public:
             }
             else
             {
-                assertex(limitHelper);
-                limitHelper->onLimitExceeded();
+                countHelper.onLimitExceeded();
             }
         }
     }
@@ -24046,10 +24021,7 @@ public:
                 else if (flags & TIRlimitcreates)
                     totalCount = 1;
                 else
-                {
-                    assertex(limitHelper);
-                    limitHelper->onLimitExceeded(); 
-                }
+                    countHelper.onLimitExceeded();
             }
             else if (totalCount > choosenLimit)
                 totalCount = choosenLimit;
@@ -24473,7 +24445,7 @@ IRoxieServerActivityFactory *createRoxieServerIndexGroupAggregateActivityFactory
 
 class CRoxieServerIndexNormalizeActivity : public CRoxieServerIndexReadBaseActivity
 {
-    IHThorCompoundNormalizeExtra & readHelper;
+    IHThorIndexNormalizeArg & readHelper;
 
 public:
     CRoxieServerIndexNormalizeActivity(IRoxieSlaveContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager, const RemoteActivityId &_remoteId,
@@ -24481,6 +24453,7 @@ public:
         : CRoxieServerIndexReadBaseActivity(_ctx, _factory, _probeManager, _remoteId, _keySet, _translators, _sorted, _isLocal, false),
           readHelper((IHThorIndexNormalizeArg &)basehelper)
     {
+        limitTransformExtra = &readHelper;
     }
 
     virtual bool needsAllocator() const { return true; }
@@ -24608,7 +24581,6 @@ IRoxieServerActivityFactory *createRoxieServerIndexNormalizeActivityFactory(unsi
 class CRoxieServerFetchActivity : public CRoxieServerActivity, implements IRecordPullerCallback, implements IRoxieServerErrorHandler
 {
     IHThorFetchBaseArg &helper;
-    IHThorFetchContext * fetchContext;
     Linked<IFilePartMap> map;
     CRemoteResultAdaptor remote;
     RecordPullerThread puller;
@@ -24621,10 +24593,9 @@ public:
     CRoxieServerFetchActivity(IRoxieSlaveContext *_ctx, const IRoxieServerActivityFactory *_factory, IProbeManager *_probeManager, const RemoteActivityId &_remoteId, IFilePartMap *_map)
         : CRoxieServerActivity(_ctx, _factory, _probeManager), helper((IHThorFetchBaseArg &)basehelper), map(_map), remote(_ctx, this, _remoteId, meta.queryOriginal(), helper, *this, true, true), puller(false)
     {
-        fetchContext = static_cast<IHThorFetchContext *>(helper.selectInterface(TAIfetchcontext_1));
         needsRHS = helper.transformNeedsRhs();
-        variableFileName = allFilesDynamic || factory->queryQueryFactory().isDynamic() || ((fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
-        isOpt = (fetchContext->getFetchFlags() & FFdatafileoptional) != 0;
+        variableFileName = allFilesDynamic || factory->queryQueryFactory().isDynamic() || ((helper.getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
+        isOpt = (helper.getFetchFlags() & FFdatafileoptional) != 0;
     }
 
     virtual const IResolvedFile *queryVarFileInfo() const
@@ -24672,7 +24643,7 @@ public:
         remote.setLimits(helper.getRowLimit(), (unsigned __int64) -1, I64C(0x7FFFFFFFFFFFFFFF));
         if (variableFileName)
         {
-            OwnedRoxieString fname(fetchContext->getFileName());
+            OwnedRoxieString fname(helper.getFileName());
             varFileInfo.setown(resolveLFN(fname, isOpt));
             if (varFileInfo)
                 map.setown(varFileInfo->getFileMap());
@@ -24710,7 +24681,7 @@ public:
     virtual void processRow(const void *row)
     {
         // called from puller thread
-        offset_t rp = fetchContext->extractPosition(row);
+        offset_t rp = helper.extractPosition(row);
         unsigned partNo;
         if (isLocalFpos(rp))
             partNo = getLocalFposPart(rp) + 1;
@@ -24789,13 +24760,12 @@ public:
         : CRoxieServerActivityFactory(_id, _subgraphId, _queryFactory, _helperFactory, _kind, _graphNode), remoteId(_remoteId)
     {
         Owned<IHThorFetchBaseArg> helper = (IHThorFetchBaseArg *) helperFactory();
-        IHThorFetchContext *fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
-        variableFileName = allFilesDynamic || _queryFactory.isDynamic() || ((fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
+        variableFileName = allFilesDynamic || _queryFactory.isDynamic() || ((helper->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) != 0);
         if (!variableFileName)
         {
-            OwnedRoxieString fname(fetchContext->getFileName());
+            OwnedRoxieString fname(helper->getFileName());
             datafile.setown(_queryFactory.queryPackage().lookupFileName(fname,
-                                                                        (fetchContext->getFetchFlags() & FFdatafileoptional) != 0,
+                                                                        (helper->getFetchFlags() & FFdatafileoptional) != 0,
                                                                         true, true,
                                                                         _queryFactory.queryWorkUnit(), true));
             if (datafile)
@@ -24816,10 +24786,9 @@ public:
         {
             // Temporarily resolve the file
             Owned<IHThorFetchBaseArg> helper = (IHThorFetchBaseArg *) helperFactory();
-            IHThorFetchContext *fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
-            if ((fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) == 0)
+            if ((helper->getFetchFlags() & (FFvarfilename|FFdynamicfilename)) == 0)
             {
-                OwnedRoxieString fileName(fetchContext->getFileName());
+                OwnedRoxieString fileName(helper->getFileName());
                 Owned<const IResolvedFile> temp = queryFactory.queryPackage().lookupFileName(fileName, true, true, false, queryFactory.queryWorkUnit(), true);
                 if (temp)
                     addXrefFileInfo(reply, temp);
@@ -26970,12 +26939,8 @@ public:
 
 //===================================================================================================================
 
-class CPseudoArg : implements IHThorArg, public CInterface
+class CPseudoArg : implements CThorSinkArgOf<IHThorArg>
 {
-public:
-    IMPLEMENT_IINTERFACE
-
-    virtual IOutputMetaData * queryOutputMeta() { return NULL; }
 };
 
 class CPseudoActivity : public CRoxieServerActivity
@@ -27947,7 +27912,7 @@ public:
 
 };
 
-struct SortActivityTest : public ccdserver_hqlhelper::CThorSortArg {
+struct SortActivityTest : public CThorSortArg {
 public:
     struct CompareClass : public ICompare {
         virtual int docompare(const void * _left, const void * _right) const {
@@ -27964,7 +27929,7 @@ public:
 };
 extern "C" IHThorArg * sortActivityTestFactory() { return new SortActivityTest; }
 
-struct MergeActivityTest : public ccdserver_hqlhelper::CThorMergeArg {
+struct MergeActivityTest : public CThorMergeArg {
     static bool isDedup;
 public:
     struct CompareClass : public ICompare {
@@ -27982,7 +27947,7 @@ public:
 bool MergeActivityTest::isDedup = false;
 extern "C" IHThorArg * mergeActivityTestFactory() { return new MergeActivityTest; }
 
-struct SplitActivityTest : public ccdserver_hqlhelper::CThorSplitArg {
+struct SplitActivityTest : public CThorSplitArg {
 public:
     virtual unsigned numBranches() { return 2; }
     virtual IOutputMetaData * queryOutputMeta()

+ 1 - 0
rtl/eclrtl/CMakeLists.txt

@@ -26,6 +26,7 @@
 project( eclrtl ) 
 
 set (    SRCS 
+         eclhelper_base.cpp
          eclrtl.cpp 
          eclregex.cpp
          rtlbcd.cpp 

+ 782 - 0
rtl/eclrtl/eclhelper_base.cpp

@@ -0,0 +1,782 @@
+/*##############################################################################
+
+    HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+############################################################################## */
+
+#include "platform.h"
+
+#include "eclrtl.hpp"
+#include "eclhelper.hpp"
+#include "rtlkey.hpp"
+#include "eclrtl_imp.hpp"
+#include "rtlfield.hpp"
+#include "rtlds_imp.hpp"
+#include "eclhelper_base.hpp"
+#include "rtlbcd.hpp"
+#include "rtlrecord.hpp"
+
+//---------------------------------------------------------------------------
+
+//CThorIndexWriteArg
+
+unsigned CThorIndexWriteArg::getFlags() { return 0; }
+const char * CThorIndexWriteArg::getDistributeIndexName() { return NULL; }
+unsigned CThorIndexWriteArg::getExpiryDays() { return 0; }
+void CThorIndexWriteArg::getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC) { }
+const char * CThorIndexWriteArg::getCluster(unsigned idx) { return NULL; }
+bool CThorIndexWriteArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+bool CThorIndexWriteArg::getIndexMeta(size32_t & lenName, char * & name, size32_t & lenValue, char * & value, unsigned idx) { return false; }
+unsigned CThorIndexWriteArg::getWidth() { return 0; }
+ICompare * CThorIndexWriteArg::queryCompare() { return NULL; }
+
+//CThorFirstNArg
+
+__int64 CThorFirstNArg::numToSkip() { return 0; }
+bool CThorFirstNArg::preserveGrouping() { return false; }
+
+//CThorDiskWriteArg
+int CThorDiskWriteArg::getSequence() { return -3; }
+unsigned CThorDiskWriteArg::getFlags() { return 0; }
+unsigned CThorDiskWriteArg::getTempUsageCount() { return 0; }
+unsigned CThorDiskWriteArg::getExpiryDays() { return 0; }
+void CThorDiskWriteArg::getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC) { }
+void CThorDiskWriteArg::getEncryptKey(size32_t & keyLen, void * & key) { keyLen = 0; key = 0; }
+const char * CThorDiskWriteArg::getCluster(unsigned idx) { return NULL; }
+
+//CThorPipeReadArg
+unsigned CThorPipeReadArg::getPipeFlags() { return 0; }
+ICsvToRowTransformer * CThorPipeReadArg::queryCsvTransformer() { return NULL; }
+IXmlToRowTransformer * CThorPipeReadArg::queryXmlTransformer() { return NULL; }
+const char * CThorPipeReadArg::getXmlIteratorPath() { return NULL; }
+
+//CThorPipeWriteArg
+char * CThorPipeWriteArg::getNameFromRow(const void * _self) { return NULL; }
+bool CThorPipeWriteArg::recreateEachRow() { return (getPipeFlags() & TPFrecreateeachrow) != 0; }
+unsigned CThorPipeWriteArg::getPipeFlags() { return 0; }
+IHThorCsvWriteExtra * CThorPipeWriteArg::queryCsvOutput() { return NULL; }
+IHThorXmlWriteExtra * CThorPipeWriteArg::queryXmlOutput() { return NULL; }
+
+//CThorPipeThroughArg
+char * CThorPipeThroughArg::getNameFromRow(const void * _self) { return NULL; }
+bool CThorPipeThroughArg::recreateEachRow() { return (getPipeFlags() & TPFrecreateeachrow) != 0; }
+unsigned CThorPipeThroughArg::getPipeFlags() { return 0; }
+IHThorCsvWriteExtra * CThorPipeThroughArg::queryCsvOutput() { return NULL; }
+IHThorXmlWriteExtra * CThorPipeThroughArg::queryXmlOutput() { return NULL; }
+ICsvToRowTransformer * CThorPipeThroughArg::queryCsvTransformer() { return NULL; }
+IXmlToRowTransformer * CThorPipeThroughArg::queryXmlTransformer() { return NULL; }
+const char * CThorPipeThroughArg::getXmlIteratorPath() { return NULL; }
+
+//CThorFilterArg
+bool CThorFilterArg::canMatchAny() { return true; }
+bool CThorFilterArg::isValid(const void * _left) { return true; }
+
+//CThorFilterGroupArg
+
+bool CThorFilterGroupArg::canMatchAny() { return true; }
+bool CThorFilterGroupArg::isValid(unsigned _num, const void * * _rows) { return true; }
+
+//CThorIterateArg
+
+bool CThorIterateArg::canFilter() { return false; }
+
+//CThorProcessArg
+
+bool CThorProcessArg::canFilter() { return false; }
+
+//CThorProjectArg
+
+bool CThorProjectArg::canFilter() { return false; }
+
+//CThorQuantileArg
+
+unsigned CThorQuantileArg::getFlags() { return 0; }
+unsigned __int64 CThorQuantileArg::getNumDivisions() { return 2; }
+double CThorQuantileArg::getSkew() { return 0; }
+unsigned __int64 CThorQuantileArg::getScore(const void * _left) { return 1; }
+void CThorQuantileArg::getRange(bool & isAll, size32_t & tlen, void * & tgt) { isAll = true; tlen = 0; tgt = NULL; }
+
+//CThorPrefetchProjectArg
+
+bool CThorPrefetchProjectArg::canFilter() { return false; }
+bool CThorPrefetchProjectArg::canMatchAny() { return true; }
+unsigned CThorPrefetchProjectArg::getFlags() { return 0; }
+unsigned CThorPrefetchProjectArg::getLookahead() { return 0; }
+IThorChildGraph *CThorPrefetchProjectArg::queryChild() { return NULL; }
+bool CThorPrefetchProjectArg::preTransform(rtlRowBuilder & extract, const void * _left, unsigned __int64 _counter) { return true; }
+
+//CThorFilterProjectArg
+
+bool CThorFilterProjectArg::canFilter() { return false; }
+bool CThorFilterProjectArg::canMatchAny() { return true; }
+
+//CThorCountProjectArg
+
+bool CThorCountProjectArg::canFilter() { return false; }
+
+//CThorCombineArg
+
+bool CThorCombineArg::canFilter() { return false; }
+
+//CThorCombineGroupArg
+
+bool CThorCombineGroupArg::canFilter() { return false; }
+
+//CThorActionArg
+
+void CThorActionArg::action() {}
+
+//CThorLimitArg
+
+void CThorLimitArg::onLimitExceeded() {}
+size32_t CThorLimitArg::transformOnLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+
+//CThorCatchArg
+
+unsigned CThorCatchArg::getFlags() { return 0; }
+bool CThorCatchArg::isHandler(IException * e) { return true; }
+void CThorCatchArg::onExceptionCaught() { }
+size32_t CThorCatchArg::transformOnExceptionCaught(ARowBuilder & rowBuilder, IException * e) { return 0; }
+
+//CThorSplitArg
+
+unsigned CThorSplitArg::numBranches() { return 2; }
+bool CThorSplitArg::isBalanced() { return false; }
+
+//CThorSpillArg
+
+IOutputMetaData * CThorSpillArg::queryDiskRecordSize() { return queryOutputMeta(); }
+int CThorSpillArg::getSequence() { return -3; }
+unsigned CThorSpillArg::getFlags() { return 0; }
+unsigned CThorSpillArg::getTempUsageCount() { return 1; }
+unsigned CThorSpillArg::getExpiryDays() { return 0; }
+void CThorSpillArg::getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC) { }
+void CThorSpillArg::getEncryptKey(size32_t & keyLen, void * & key) { keyLen = 0; key = 0; }
+const char * CThorSpillArg::getCluster(unsigned idx) { return NULL; }
+
+//CThorRollupArg
+
+unsigned CThorRollupArg::getFlags() { return 0; }
+bool CThorRollupArg::matches(const void * _left, const void * _right) { return true; }
+
+//CThorDedupArg
+
+bool CThorDedupArg::matches(const void * _left, const void * _right) { return true; }
+unsigned CThorDedupArg::numToKeep() { return 1; }
+ICompare * CThorDedupArg::queryComparePrimary() { return NULL; }
+unsigned CThorDedupArg::getFlags() { return HDFkeepleft; }
+ICompare * CThorDedupArg::queryCompareBest() { return NULL; }
+
+//CThorAggregateArg
+
+unsigned CThorAggregateArg::getAggregateFlags() { return 0; }
+size32_t CThorAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorCountAggregateArg
+
+size32_t CThorCountAggregateArg::clearAggregate(ARowBuilder & rowBuilder)
+{
+    void * target = rowBuilder.getSelf();
+    *((unsigned __int64 *)target) = 0;
+    return sizeof(unsigned __int64);
+}
+size32_t CThorCountAggregateArg::processFirst(ARowBuilder & rowBuilder, const void * src)
+{
+    void * target = rowBuilder.getSelf();
+    *((unsigned __int64 *)target) = 1;
+    return sizeof(unsigned __int64);
+}
+size32_t CThorCountAggregateArg::processNext(ARowBuilder & rowBuilder, const void * src)
+{
+    void * target = rowBuilder.getSelf();
+    ++*((unsigned __int64 *)target);
+    return sizeof(unsigned __int64);
+}
+size32_t CThorCountAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src)
+{
+    void * target = rowBuilder.getSelf();
+    *((unsigned __int64 *)target) += *((unsigned __int64 *)src);
+    return sizeof(unsigned __int64);
+}
+
+//CThorExistsAggregateArg
+
+size32_t CThorExistsAggregateArg::clearAggregate(ARowBuilder & rowBuilder)
+{
+    void * target = rowBuilder.getSelf();
+    *((bool *)target) = false;
+    return sizeof(bool);
+}
+size32_t CThorExistsAggregateArg::processFirst(ARowBuilder & rowBuilder, const void * src)
+{
+    void * target = rowBuilder.getSelf();
+    *((bool *)target) = true;
+    return sizeof(bool);
+}
+size32_t CThorExistsAggregateArg::processNext(ARowBuilder & rowBuilder, const void * src)
+{
+    return sizeof(bool);
+}
+size32_t CThorExistsAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src)
+{
+    void * target = rowBuilder.getSelf();
+    if (*((bool *)src))
+        *((bool *)target) = true;
+    return sizeof(bool);
+}
+
+//CThorThroughAggregateArg
+
+unsigned CThorThroughAggregateArg::getAggregateFlags() { return 0; }
+size32_t CThorThroughAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorGroupAggregateArg
+
+unsigned CThorGroupAggregateArg::getAggregateFlags() { return 0; }
+size32_t CThorGroupAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorHashAggregateArg
+
+unsigned CThorHashAggregateArg::getAggregateFlags() { return 0; }
+size32_t CThorHashAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+
+//CThorInlineTableArg
+
+unsigned CThorInlineTableArg::getFlags() { return 0; }
+
+//CThorInlineRowArg
+
+__uint64 CThorInlineRowArg::numRows() { return 1; }
+
+//CThorFunnelArg
+
+bool CThorFunnelArg::isOrdered() { return false; }
+bool CThorFunnelArg::pullSequentially() { return false; }
+
+//CThorMergeArg
+
+ISortKeySerializer * CThorMergeArg::querySerialize() { return NULL; }        // only if global
+ICompare * CThorMergeArg::queryCompareKey() { return NULL; }
+ICompare * CThorMergeArg::queryCompareRowKey() { return NULL; }        // row is lhs, key is rhs
+bool CThorMergeArg::dedup() { return false; }
+
+//CThorRemoteResultArg
+
+int CThorRemoteResultArg::getSequence() { return -3; }
+
+//CThorApplyArg
+
+void CThorApplyArg::start() { }
+void CThorApplyArg::end() { }
+
+//CThorSortArg
+
+double CThorSortArg::getSkew() { return 0; }           // 0=default
+bool CThorSortArg::hasManyRecords() { return false; }
+double CThorSortArg::getTargetSkew() { return 0; }
+ISortKeySerializer * CThorSortArg::querySerialize() { return NULL; }
+unsigned __int64 CThorSortArg::getThreshold() { return 0; }
+IOutputMetaData * CThorSortArg::querySortedRecordSize() { return NULL; }
+const char * CThorSortArg::getSortedFilename() { return NULL; }
+ICompare * CThorSortArg::queryCompareLeftRight() { return NULL; }
+ICompare * CThorSortArg::queryCompareSerializedRow() { return NULL; }
+unsigned CThorSortArg::getAlgorithmFlags() { return TAFconstant; }
+const char * CThorSortArg::getAlgorithm() { return NULL; }
+
+//CThorTopNArg
+
+double CThorTopNArg::getSkew() { return 0; }           // 0=default
+bool CThorTopNArg::hasManyRecords() { return false; }
+double CThorTopNArg::getTargetSkew() { return 0; }
+ISortKeySerializer * CThorTopNArg::querySerialize() { return NULL; }
+unsigned __int64 CThorTopNArg::getThreshold() { return 0; }
+IOutputMetaData * CThorTopNArg::querySortedRecordSize() { return NULL; }
+const char * CThorTopNArg::getSortedFilename() { return NULL; }
+ICompare * CThorTopNArg::queryCompareLeftRight() { return NULL; }
+ICompare * CThorTopNArg::queryCompareSerializedRow() { return NULL; }
+unsigned CThorTopNArg::getAlgorithmFlags() { return TAFconstant; }
+const char * CThorTopNArg::getAlgorithm() { return NULL; }
+
+bool CThorTopNArg::hasBest() { return false; }
+int CThorTopNArg::compareBest(const void * _left) { return +1; }
+
+//CThorSubSortArg
+
+double CThorSubSortArg::getSkew() { return 0; }           // 0=default
+bool CThorSubSortArg::hasManyRecords() { return false; }
+double CThorSubSortArg::getTargetSkew() { return 0; }
+ISortKeySerializer * CThorSubSortArg::querySerialize() { return NULL; }
+unsigned __int64 CThorSubSortArg::getThreshold() { return 0; }
+IOutputMetaData * CThorSubSortArg::querySortedRecordSize() { return NULL; }
+const char * CThorSubSortArg::getSortedFilename() { return NULL; }
+ICompare * CThorSubSortArg::queryCompareLeftRight() { return NULL; }
+ICompare * CThorSubSortArg::queryCompareSerializedRow() { return NULL; }
+
+//CThorKeyedJoinArg
+
+bool CThorKeyedJoinArg::diskAccessRequired() { return false; }
+const char * CThorKeyedJoinArg::getFileName() { return NULL; }
+IOutputMetaData * CThorKeyedJoinArg::queryDiskRecordSize() { return NULL; }
+unsigned __int64 CThorKeyedJoinArg::extractPosition(const void * _right) { return 0; }
+
+bool CThorKeyedJoinArg::leftCanMatch(const void * inputRow) { return true; }
+bool CThorKeyedJoinArg::indexReadMatch(const void * indexRow, const void * inputRow, unsigned __int64 keyedFpos, IBlobProvider * blobs) { return true; }
+
+unsigned __int64 CThorKeyedJoinArg::getRowLimit() { return (unsigned __int64) -1; }
+void CThorKeyedJoinArg::onLimitExceeded() { }
+unsigned __int64 CThorKeyedJoinArg::getSkipLimit() { return 0; }
+unsigned CThorKeyedJoinArg::getMatchAbortLimit() { return 0; }
+void CThorKeyedJoinArg::onMatchAbortLimitExceeded() { }
+
+unsigned CThorKeyedJoinArg::getJoinLimit() { return 0; }
+unsigned CThorKeyedJoinArg::getKeepLimit() { return 0; }
+unsigned CThorKeyedJoinArg::getJoinFlags() { return 0; }
+bool CThorKeyedJoinArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+
+size32_t CThorKeyedJoinArg::extractFetchFields(ARowBuilder & rowBuilder, const void * _input) { return 0; }
+bool CThorKeyedJoinArg::fetchMatch(const void * diskRow, const void * inputRow) { return true; }
+size32_t CThorKeyedJoinArg::createDefaultRight(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorKeyedJoinArg::onFailTransform(ARowBuilder & rowBuilder, const void * _dummyRight, const void * _origRow, unsigned __int64 keyedFpos, IException * e) { return 0; }
+//Join:
+//Denormalize:
+size32_t CThorKeyedJoinArg::transform(ARowBuilder & rowBuilder, const void * _joinFields, const void * _origRow, unsigned __int64 keyedFpos, unsigned counter) { return 0; }
+//Denormalize group:
+size32_t CThorKeyedJoinArg::transform(ARowBuilder & rowBuilder, const void * _joinFields, const void * _origRow, unsigned _numRows, const void * * _rows) { return 0; }
+
+
+//CThorJoinArg
+
+bool CThorJoinArg::isLeftAlreadySorted() { return false; }
+bool CThorJoinArg::isRightAlreadySorted() { return false; }
+size32_t CThorJoinArg::createDefaultLeft(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorJoinArg::createDefaultRight(ARowBuilder & rowBuilder) { return 0; }
+bool CThorJoinArg::match(const void * _left, const void * _right) { return true; }
+ISortKeySerializer * CThorJoinArg::querySerializeLeft() { return NULL; }
+ISortKeySerializer * CThorJoinArg::querySerializeRight() { return NULL; }
+unsigned __int64 CThorJoinArg::getThreshold() { return 0; }
+double CThorJoinArg::getSkew() { return 0; }           // 0=default
+double CThorJoinArg::getTargetSkew() { return 0; }           // 0=default
+unsigned CThorJoinArg::getJoinLimit() { return 0; }
+unsigned CThorJoinArg::getKeepLimit() { return 0; }
+unsigned CThorJoinArg::getJoinFlags() { return 0; }
+unsigned CThorJoinArg::getMatchAbortLimit() { return 0; }
+void CThorJoinArg::onMatchAbortLimitExceeded() { }
+ICompare * CThorJoinArg::queryCompareLeftRightLower() { return NULL; }
+ICompare * CThorJoinArg::queryCompareLeftRightUpper() { return NULL; }
+ICompare * CThorJoinArg::queryPrefixCompare() { return NULL; }
+ICompare * CThorJoinArg::queryCompareLeftKeyRightRow() { return NULL; }
+ICompare * CThorJoinArg::queryCompareRightKeyLeftRow() { return NULL; }
+size32_t CThorJoinArg::onFailTransform(ARowBuilder & rowBuilder, const void * _left, const void * _right, IException * e, unsigned flggs) { return 0; }
+size32_t CThorJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _count, unsigned flags) { return 0; }
+size32_t CThorJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _numRows, const void * * _rows, unsigned flags) { return 0; }
+
+//CThorAllJoinArg
+
+size32_t CThorAllJoinArg::createDefaultLeft(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorAllJoinArg::createDefaultRight(ARowBuilder & rowBuilder) { return 0; }
+bool CThorAllJoinArg::match(const void * _left, const void * _right) { return true; }
+unsigned CThorAllJoinArg::getKeepLimit() { return 0; }
+unsigned CThorAllJoinArg::getJoinFlags() { return 0; }
+size32_t CThorAllJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _count, unsigned flags) { return 0; }
+size32_t CThorAllJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _numRows, const void * * _rows, unsigned flags) { return 0; }
+unsigned CThorAllJoinArg::getMatchAbortLimit() { return 0; }
+void CThorAllJoinArg::onMatchAbortLimitExceeded() { }
+
+//CThorHashJoinArg
+
+bool CThorHashJoinArg::isLeftAlreadySorted() { return false; }
+bool CThorHashJoinArg::isRightAlreadySorted() { return false; }
+size32_t CThorHashJoinArg::createDefaultLeft(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorHashJoinArg::createDefaultRight(ARowBuilder & rowBuilder) { return 0; }
+bool CThorHashJoinArg::match(const void * _left, const void * _right) { return true; }
+ISortKeySerializer * CThorHashJoinArg::querySerializeLeft() { return NULL; }
+ISortKeySerializer * CThorHashJoinArg::querySerializeRight() { return NULL; }
+unsigned __int64 CThorHashJoinArg::getThreshold() { return 0; }
+double CThorHashJoinArg::getSkew() { return 0; }           // 0=default
+double CThorHashJoinArg::getTargetSkew() { return 0; }           // 0=default
+unsigned CThorHashJoinArg::getJoinLimit() { return 0; }
+unsigned CThorHashJoinArg::getKeepLimit() { return 0; }
+unsigned CThorHashJoinArg::getJoinFlags() { return 0; }
+unsigned CThorHashJoinArg::getMatchAbortLimit() { return 0; }
+void CThorHashJoinArg::onMatchAbortLimitExceeded() { }
+ICompare * CThorHashJoinArg::queryCompareLeftRightLower() { return NULL; }
+ICompare * CThorHashJoinArg::queryCompareLeftRightUpper() { return NULL; }
+ICompare * CThorHashJoinArg::queryCompareLeft() { return NULL; }        // not needed for lookup
+ICompare * CThorHashJoinArg::queryCompareRight() { return NULL; }        // not needed for many lookup
+ICompare * CThorHashJoinArg::queryPrefixCompare() { return NULL; }
+ICompare * CThorHashJoinArg::queryCompareLeftKeyRightRow() { return NULL; }
+ICompare * CThorHashJoinArg::queryCompareRightKeyLeftRow() { return NULL; }
+size32_t CThorHashJoinArg::onFailTransform(ARowBuilder & rowBuilder, const void * _left, const void * _right, IException * e, unsigned flags) { return 0; }
+size32_t CThorHashJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _count, unsigned flags) { return 0; }
+size32_t CThorHashJoinArg::transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _numRows, const void * * _rows, unsigned flags) { return 0; }
+
+//CThorKeyedDistributeArg
+
+unsigned CThorKeyedDistributeArg::getFlags() { return 0; }
+bool CThorKeyedDistributeArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+
+//CThorWorkUnitWriteArg
+
+int CThorWorkUnitWriteArg::getSequence() { return -3; }
+const char * CThorWorkUnitWriteArg::queryName() { return NULL; }
+unsigned CThorWorkUnitWriteArg::getFlags() { return 0; }
+void CThorWorkUnitWriteArg::serializeXml(const byte * self, IXmlWriter & out) { rtlSysFail(1, "serializeXml not implemented"); }
+unsigned CThorWorkUnitWriteArg::getMaxSize() { return 0; }
+
+//CThorXmlWorkunitWriteArg
+
+int CThorXmlWorkunitWriteArg::getSequence() { return -3; }
+const char * CThorXmlWorkunitWriteArg::queryName() { return NULL; }
+unsigned CThorXmlWorkunitWriteArg::getFlags() { return 0; }
+
+//CThorDictionaryWorkUnitWriteArg
+
+int CThorDictionaryWorkUnitWriteArg::getSequence() { return -3; }
+const char * CThorDictionaryWorkUnitWriteArg::queryName() { return NULL; }
+unsigned CThorDictionaryWorkUnitWriteArg::getFlags() { return 0; }
+
+//CThorDictionaryResultWriteArg
+
+bool CThorDictionaryResultWriteArg::usedOutsideGraph() { return true; }
+
+//CThorHashDistributeArg
+
+IHash    * CThorHashDistributeArg::queryHash() { return NULL; }
+double CThorHashDistributeArg::getSkew() { return 0; }           // 0=default
+double CThorHashDistributeArg::getTargetSkew() { return 0; }           // 0=default
+ICompare * CThorHashDistributeArg::queryMergeCompare() { return NULL; }
+
+//CThorHashDedupArg
+
+unsigned CThorHashDedupArg::getFlags() { return HDFkeepleft; }
+ICompare * CThorHashDedupArg::queryCompareBest() { return NULL; }
+IOutputMetaData * CThorHashDedupArg::queryKeySize() { return NULL; }
+size32_t CThorHashDedupArg::recordToKey(ARowBuilder & rowBuilder, const void * _record) { return 0; }
+
+//CThorKeyDiffArg
+
+unsigned CThorKeyDiffArg::getFlags() { return 0; }
+unsigned CThorKeyDiffArg::getExpiryDays() { return 0; }
+
+//CThorKeyPatchArg
+
+unsigned CThorKeyPatchArg::getFlags() { return 0; }
+unsigned CThorKeyPatchArg::getExpiryDays() { return 0; }
+
+//CThorWorkunitReadArg
+
+int CThorWorkunitReadArg::querySequence() { return -3; }
+const char * CThorWorkunitReadArg::getWUID() { return NULL; }
+ICsvToRowTransformer * CThorWorkunitReadArg::queryCsvTransformer() { return NULL; }
+IXmlToRowTransformer * CThorWorkunitReadArg::queryXmlTransformer() { return NULL; }
+
+//CThorLocalResultWriteArg
+
+bool CThorLocalResultWriteArg::usedOutsideGraph() { return true; }
+
+//CThorCsvWriteArg
+
+int CThorCsvWriteArg::getSequence() { return -3; }
+unsigned CThorCsvWriteArg::getFlags() { return 0; }
+unsigned CThorCsvWriteArg::getTempUsageCount() { return 0; }
+unsigned CThorCsvWriteArg::getExpiryDays() { return 0; }
+void CThorCsvWriteArg::getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC) { }
+void CThorCsvWriteArg::getEncryptKey(size32_t & keyLen, void * & key) { keyLen = 0; key = 0; }
+const char * CThorCsvWriteArg::getCluster(unsigned idx) { return NULL; }
+
+//CThorXmlParseArg
+
+bool CThorXmlParseArg::requiresContents() { return false; }
+
+//CThorXmlFetchArg
+
+bool CThorXmlFetchArg::requiresContents() { return false; }
+
+//CThorXmlWriteArg
+
+const char * CThorXmlWriteArg::getXmlIteratorPath() { return NULL; }             // supplies the prefix and suffix for a row
+const char * CThorXmlWriteArg::getHeader() { return NULL; }
+const char * CThorXmlWriteArg::getFooter() { return NULL; }
+unsigned CThorXmlWriteArg::getXmlFlags() { return 0; }
+
+int CThorXmlWriteArg::getSequence() { return -3; }
+unsigned CThorXmlWriteArg::getFlags() { return 0; }
+unsigned CThorXmlWriteArg::getTempUsageCount() { return 0; }
+unsigned CThorXmlWriteArg::getExpiryDays() { return 0; }
+void CThorXmlWriteArg::getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC) { }
+void CThorXmlWriteArg::getEncryptKey(size32_t & keyLen, void * & key) { keyLen = 0; key = 0; }
+const char * CThorXmlWriteArg::getCluster(unsigned idx) { return NULL; }
+
+//CThorSoapActionArg
+
+void CThorSoapActionArg::toXML(const byte * self, IXmlWriter & out) { return; }
+const char * CThorSoapActionArg::getHeader() { return NULL; }
+const char * CThorSoapActionArg::getFooter() { return NULL; }
+unsigned CThorSoapActionArg::getFlags() { return 0; }
+unsigned CThorSoapActionArg::numParallelThreads() { return 0; }
+unsigned CThorSoapActionArg::numRecordsPerBatch() { return 0; }
+int CThorSoapActionArg::numRetries() { return -1; }
+double CThorSoapActionArg::getTimeout() { return -1.0; }
+double CThorSoapActionArg::getTimeLimit() { return 0.0; }
+const char * CThorSoapActionArg::getSoapAction() { return NULL; }
+const char * CThorSoapActionArg::getNamespaceName() { return NULL; }
+const char * CThorSoapActionArg::getNamespaceVar() { return NULL; }
+const char * CThorSoapActionArg::getHttpHeaderName() { return NULL; }
+const char * CThorSoapActionArg::getHttpHeaderValue() { return NULL; }
+const char * CThorSoapActionArg::getHttpHeaders() { return NULL; }
+const char * CThorSoapActionArg::getProxyAddress() { return NULL; }
+const char * CThorSoapActionArg::getAcceptType() { return NULL; }
+IXmlToRowTransformer * CThorSoapActionArg::queryInputTransformer() { return NULL; }
+const char * CThorSoapActionArg::getInputIteratorPath() { return NULL; }
+size32_t CThorSoapActionArg::onFailTransform(ARowBuilder & rowBuilder, const void * left, IException * e) { return 0; }
+void CThorSoapActionArg::getLogText(size32_t & lenText, char * & text, const void * left) { lenText =0; text = NULL; }
+
+//CThorSoapCallArg
+
+void CThorSoapCallArg::toXML(const byte * self, IXmlWriter & out) { return; }
+const char * CThorSoapCallArg::getHeader() { return NULL; }
+const char * CThorSoapCallArg::getFooter() { return NULL; }
+unsigned CThorSoapCallArg::getFlags() { return 0; }
+unsigned CThorSoapCallArg::numParallelThreads() { return 0; }
+unsigned CThorSoapCallArg::numRecordsPerBatch() { return 0; }
+int CThorSoapCallArg::numRetries() { return -1; }
+double CThorSoapCallArg::getTimeout() { return -1.0; }
+double CThorSoapCallArg::getTimeLimit() { return 0.0; }
+const char * CThorSoapCallArg::getSoapAction() { return NULL; }
+const char * CThorSoapCallArg::getNamespaceName() { return NULL; }
+const char * CThorSoapCallArg::getNamespaceVar() { return NULL; }
+const char * CThorSoapCallArg::getHttpHeaderName() { return NULL; }
+const char * CThorSoapCallArg::getHttpHeaderValue() { return NULL; }
+const char * CThorSoapCallArg::getHttpHeaders() { return NULL; }
+const char * CThorSoapCallArg::getProxyAddress() { return NULL; }
+const char * CThorSoapCallArg::getAcceptType() { return NULL; }
+IXmlToRowTransformer * CThorSoapCallArg::queryInputTransformer() { return NULL; }
+const char * CThorSoapCallArg::getInputIteratorPath() { return NULL; }
+size32_t CThorSoapCallArg::onFailTransform(ARowBuilder & rowBuilder, const void * left, IException * e) { return 0; }
+void CThorSoapCallArg::getLogText(size32_t & lenText, char * & text, const void * left) { lenText =0; text = NULL; }
+
+//CThorParseArg
+
+INlpHelper * CThorParseArg::queryHelper() { return NULL; }
+unsigned CThorParseArg::getFlags() { return 0; }
+IOutputMetaData * CThorParseArg::queryProductionMeta(unsigned id) { return NULL; }
+size32_t CThorParseArg::executeProduction(ARowBuilder & rowBuilder, unsigned id, IProductionCallback * input) { return 0; }
+
+//CThorIndexReadArg
+
+unsigned CThorIndexReadArg::getFlags() { return 0; }
+bool CThorIndexReadArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+void CThorIndexReadArg::setCallback(IThorIndexCallback * _tc) { fpp = _tc; }
+
+bool CThorIndexReadArg::needTransform() { return false; }
+bool CThorIndexReadArg::transformMayFilter() { return false; }
+unsigned __int64 CThorIndexReadArg::getKeyedLimit() { return (unsigned __int64) -1; }
+void CThorIndexReadArg::onKeyedLimitExceeded() { }
+ISteppingMeta * CThorIndexReadArg::queryRawSteppingMeta() { return NULL; }
+ISteppingMeta * CThorIndexReadArg::queryProjectedSteppingMeta() { return NULL; }
+void CThorIndexReadArg::mapOutputToInput(ARowBuilder & rowBuilder, const void * projectedRow, unsigned numFields) {}
+size32_t CThorIndexReadArg::unfilteredTransform(ARowBuilder & rowBuilder, const void * src) { return 0; }
+
+size32_t CThorIndexReadArg::transformOnLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorIndexReadArg::transformOnKeyedLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+IHThorSteppedSourceExtra *CThorIndexReadArg::querySteppingExtra() { return NULL; }
+
+//CThorSteppedIndexReadArg
+
+IHThorSteppedSourceExtra *CThorSteppedIndexReadArg::querySteppingExtra() { return this; }
+unsigned CThorSteppedIndexReadArg::getSteppedFlags() { return 0; }
+double CThorSteppedIndexReadArg::getPriority() { return 0; }
+unsigned CThorSteppedIndexReadArg::getPrefetchSize() { return 0; }
+
+
+//CThorIndexNormalizeArg
+
+unsigned CThorIndexNormalizeArg::getFlags() { return 0; }
+bool CThorIndexNormalizeArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+void CThorIndexNormalizeArg::setCallback(IThorIndexCallback * _tc) { fpp = _tc; }
+
+size32_t CThorIndexNormalizeArg::transformOnLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorIndexNormalizeArg::transformOnKeyedLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+
+//CThorIndexAggregateArg
+
+unsigned CThorIndexAggregateArg::getFlags() { return 0; }
+bool CThorIndexAggregateArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+void CThorIndexAggregateArg::setCallback(IThorIndexCallback * _tc) { fpp = _tc; }
+size32_t CThorIndexAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorIndexCountArg
+
+unsigned CThorIndexCountArg::getFlags() { return 0; }
+bool CThorIndexCountArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+void CThorIndexCountArg::setCallback(IThorIndexCallback * _tc) { fpp = _tc; }
+unsigned __int64 CThorIndexCountArg::getRowLimit() { return (unsigned __int64) -1; }
+void CThorIndexCountArg::onLimitExceeded() { }
+unsigned __int64 CThorIndexCountArg::getKeyedLimit() { return (unsigned __int64) -1; }
+void CThorIndexCountArg::onKeyedLimitExceeded() { }
+size32_t CThorIndexCountArg::numValid(size32_t srcLen, const void * _src)
+{
+    rtlFailUnexpected();
+    return 0;
+}
+
+//CThorIndexGroupAggregateArg
+
+unsigned CThorIndexGroupAggregateArg::getFlags() { return 0; }
+bool CThorIndexGroupAggregateArg::getIndexLayout(size32_t & _retLen, void * & _retData) { return false; }
+void CThorIndexGroupAggregateArg::setCallback(IThorIndexCallback * _tc) { fpp = _tc; }
+bool CThorIndexGroupAggregateArg::createGroupSegmentMonitors(IIndexReadContext *ctx) { return false; }
+unsigned CThorIndexGroupAggregateArg::getGroupSegmentMonitorsSize() { return 0; }
+size32_t CThorIndexGroupAggregateArg::initialiseCountGrouping(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+size32_t CThorIndexGroupAggregateArg::processCountGrouping(ARowBuilder & rowBuilder, unsigned __int64 count) { rtlFailUnexpected(); return 0; }
+size32_t CThorIndexGroupAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorDiskReadArg
+
+unsigned CThorDiskReadArg::getFlags() { return 0; }
+void CThorDiskReadArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+
+bool CThorDiskReadArg::needTransform() { return false; }
+bool CThorDiskReadArg::transformMayFilter() { return false; }
+unsigned __int64 CThorDiskReadArg::getKeyedLimit() { return (unsigned __int64) -1; }
+void CThorDiskReadArg::onKeyedLimitExceeded() { }
+ISteppingMeta * CThorDiskReadArg::queryRawSteppingMeta() { return NULL; }
+ISteppingMeta * CThorDiskReadArg::queryProjectedSteppingMeta() { return NULL; }
+void CThorDiskReadArg::mapOutputToInput(ARowBuilder & rowBuilder, const void * projectedRow, unsigned numFields) { }
+size32_t CThorDiskReadArg::unfilteredTransform(ARowBuilder & rowBuilder, const void * src) { return 0; }
+size32_t CThorDiskReadArg::transformOnLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorDiskReadArg::transformOnKeyedLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+
+//CThorDiskNormalizeArg
+
+unsigned CThorDiskNormalizeArg::getFlags() { return 0; }
+void CThorDiskNormalizeArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+size32_t CThorDiskNormalizeArg::transformOnLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+size32_t CThorDiskNormalizeArg::transformOnKeyedLimitExceeded(ARowBuilder & rowBuilder) { return 0; }
+
+//CThorDiskAggregateArg
+
+unsigned CThorDiskAggregateArg::getFlags() { return 0; }
+void CThorDiskAggregateArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+size32_t CThorDiskAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorDiskCountArg
+
+unsigned CThorDiskCountArg::getFlags() { return 0; }
+void CThorDiskCountArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+
+unsigned __int64 CThorDiskCountArg::getRowLimit() { return (unsigned __int64) -1; }
+void CThorDiskCountArg::onLimitExceeded() { }
+unsigned __int64 CThorDiskCountArg::getKeyedLimit() { return (unsigned __int64) -1; }
+void CThorDiskCountArg::onKeyedLimitExceeded() { }
+
+//CThorDiskGroupAggregateArg
+
+unsigned CThorDiskGroupAggregateArg::getFlags() { return 0; }
+void CThorDiskGroupAggregateArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+bool CThorDiskGroupAggregateArg::createGroupSegmentMonitors(IIndexReadContext *ctx) { return false; }
+unsigned CThorDiskGroupAggregateArg::getGroupSegmentMonitorsSize() { return 0; }
+size32_t CThorDiskGroupAggregateArg::initialiseCountGrouping(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+size32_t CThorDiskGroupAggregateArg::processCountGrouping(ARowBuilder & rowBuilder, unsigned __int64 count) { rtlFailUnexpected(); return 0; }
+size32_t CThorDiskGroupAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorCsvReadArg
+
+unsigned CThorCsvReadArg::getFlags() { return 0; }
+unsigned __int64 CThorCsvReadArg::getChooseNLimit() { return I64C(0x7fffffffffffffff); }
+unsigned __int64 CThorCsvReadArg::getRowLimit() { return (unsigned __int64) -1; }
+void CThorCsvReadArg::onLimitExceeded() { }
+unsigned CThorCsvReadArg::getFormatCrc() { return 0; }   // no meaning
+void CThorCsvReadArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+
+//CThorXmlReadArg
+
+unsigned CThorXmlReadArg::getFlags() { return 0; }
+unsigned __int64 CThorXmlReadArg::getChooseNLimit() { return I64C(0x7fffffffffffffff); }
+unsigned __int64 CThorXmlReadArg::getRowLimit() { return (unsigned __int64) -1; }
+void CThorXmlReadArg::onLimitExceeded() { }
+unsigned CThorXmlReadArg::getFormatCrc() { return 0; }   // no meaning
+void CThorXmlReadArg::setCallback(IThorDiskCallback * _tc) { fpp = _tc; }
+
+//CThorChildGroupAggregateArg
+
+size32_t CThorChildGroupAggregateArg::mergeAggregate(ARowBuilder & rowBuilder, const void * src) { rtlFailUnexpected(); return 0; }
+
+//CThorLoopArg
+
+unsigned CThorLoopArg::getFlags() { return 0; }
+bool CThorLoopArg::sendToLoop(unsigned counter, const void * in) { return true; }
+unsigned CThorLoopArg::numIterations() { return 0; }
+bool CThorLoopArg::loopAgain(unsigned counter, unsigned num, const void * * _rows) { return num != 0; }
+unsigned CThorLoopArg::defaultParallelIterations() { return 0; }
+bool CThorLoopArg::loopFirstTime() { return false; }
+unsigned CThorLoopArg::loopAgainResult() { return 0; }
+
+//CThorGraphLoopArg
+
+unsigned CThorGraphLoopArg::getFlags() { return 0; }
+
+//CThorRemoteArg
+
+IOutputMetaData * CThorRemoteArg::queryOutputMeta() { return NULL; }        // for action variety
+unsigned __int64 CThorRemoteArg::getRowLimit() { return 10000; }
+void CThorRemoteArg::onLimitExceeded() { rtlSysFail(1, "Too many records returned from ALLNODES()"); }
+
+//CThorNWayGraphLoopResultReadArg
+
+bool CThorNWayGraphLoopResultReadArg::isGrouped() const { return false; }
+
+//CThorNWayMergeArg
+
+ISortKeySerializer * CThorNWayMergeArg::querySerialize() { return NULL; }        // only if global
+ICompare * CThorNWayMergeArg::queryCompareKey() { return NULL; }
+ICompare * CThorNWayMergeArg::queryCompareRowKey() { return NULL; }        // row is lhs, key is rhs
+bool CThorNWayMergeArg::dedup() { return false; }
+ISteppingMeta * CThorNWayMergeArg::querySteppingMeta() { return NULL; }
+
+//CThorNWayMergeJoinArg
+
+unsigned CThorNWayMergeJoinArg::getJoinFlags() { return 0; }
+ICompareEq * CThorNWayMergeJoinArg::queryNonSteppedCompare() { return NULL; }
+void CThorNWayMergeJoinArg::adjustRangeValue(ARowBuilder & rowBuilder, const void * input, __int64 delta) {}
+unsigned __int64 CThorNWayMergeJoinArg::extractRangeValue(const void * input) { return 0; }
+__int64 CThorNWayMergeJoinArg::maxRightBeforeLeft() { return 0; }
+__int64 CThorNWayMergeJoinArg::maxLeftBeforeRight() { return 0; }
+size32_t CThorNWayMergeJoinArg::transform(ARowBuilder & rowBuilder, unsigned _num, const void * * _rows) { return 0; }
+bool CThorNWayMergeJoinArg::createNextJoinValue(ARowBuilder & rowBuilder, const void * _value) { return false; }
+unsigned CThorNWayMergeJoinArg::getMinMatches() { return 0; }
+unsigned CThorNWayMergeJoinArg::getMaxMatches() { return 0x7fffffff; }
+INaryCompareEq * CThorNWayMergeJoinArg::queryGlobalCompare() { return NULL; }
+size32_t CThorNWayMergeJoinArg::createLowInputRow(ARowBuilder & rowBuilder) { return 0; }
+ICompareEq * CThorNWayMergeJoinArg::queryPartitionCompareEq() { return NULL; }
+
+//CThorSectionArg
+
+unsigned CThorSectionArg::getFlags() { return 0; }
+void CThorSectionArg::getDescription(size32_t & _retLen, char * & _retData) { _retLen = 0; _retData = NULL; }
+
+//CThorSectionInputArg
+
+unsigned CThorSectionInputArg::getFlags() { return 0; }
+
+//CThorTraceArg
+
+bool CThorTraceArg::isValid(const void * _left) { return true; }
+bool CThorTraceArg::canMatchAny() { return true; }
+unsigned CThorTraceArg::getKeepLimit() { return (unsigned) -1; }
+unsigned CThorTraceArg::getSample() { return 0; }
+unsigned CThorTraceArg::getSkip() { return 0; }
+const char *CThorTraceArg::getName() { return NULL; }
+

+ 43 - 204
rtl/include/eclhelper.hpp

@@ -44,8 +44,8 @@ typedef unsigned short UChar;
 
 //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      165
-#define MIN_ACTIVITY_INTERFACE_VERSION  165             //minimum value that is compatible with current interface - without using selectInterface
+#define ACTIVITY_INTERFACE_VERSION      200
+#define MIN_ACTIVITY_INTERFACE_VERSION  200             //minimum value that is compatible with current interface
 
 typedef unsigned char byte;
 
@@ -980,151 +980,6 @@ inline bool isSimpleJoin(ThorActivityKind kind) { return (kind >= TAKjoin) && (k
 inline bool isDenormalizeJoin(ThorActivityKind kind) { return (kind >= TAKdenormalize) && (kind <= TAKlastdenormalize); }
 inline bool isDenormalizeGroupJoin(ThorActivityKind kind) { return (kind >= TAKdenormalizegroup) && (kind <= TAKlastdenormalizegroup); }
 
-enum ActivityInterfaceEnum
-{
-    TAInone,
-    TAIarg,
-    TAIpipereadarg_1,
-    TAIindexwritearg_1,
-    TAIfirstnarg_1,
-    TAIchoosesetsarg_1,
-    TAIchoosesetsexarg_1,
-    TAIdiskwritearg_1,
-    TAIpipewritearg_1,
-    TAIpipethrougharg_1,
-    TAIfilterarg_1,
-    TAIgrouparg_1,
-    TAIdegrouparg_1,
-    TAIiteratearg_1,
-    TAIprojectarg_1,
-    TAIcountprojectarg_1,
-    TAInormalizearg_1,
-    TAIselectnarg_1,
-    TAIcombinearg_1,
-    TAIcombinegrouparg_1,
-    TAIrollupgrouparg_1,
-    TAIregrouparg_1,
-    TAInullarg_1,
-    TAIactionarg_1,
-    TAIlimitarg_1,
-    TAIsplitarg_1,
-    TAInormalizechildarg_1,
-    TAIchilditeratorarg_1,
-    TAIrolluparg_1,
-    TAIdeduparg_1,
-    TAIaggregatearg_1,
-    TAIthroughaggregateextra_1,
-    TAIdistributionarg_1,
-    TAIhashaggregateextra_1,
-    TAIsamplearg_1,
-    TAIentharg_1,
-    TAIfunnelarg_1,
-    TAImergearg_1,
-    TAIremoteresultarg_1,
-    TAIapplyarg_1,
-    TAIsortarg_1,
-    TAItopnextra_1,
-    TAIkeyedjoinbasearg_1,
-    TAIjoinbasearg_1,
-    TAIalljoinarg_1,
-    TAIhashjoinextra_1,
-    TAIkeyeddistributearg_1,
-    TAIcountfilearg_1,
-    TAIbinfetchextra_1,
-    TAIworkunitwritearg_1,
-    TAIxmlworkunitwritearg_1,
-    TAIhashdistributearg_1,
-    TAIhashdeduparg_1,
-    TAIhashminusarg_1,
-    TAIifarg_1,
-    TAIcasearg_1,
-    TAIkeydiffarg_1,
-    TAIkeypatcharg_1,
-    TAIworkunitreadarg_1,
-    TAIlocalresultreadarg_1,
-    TAIlocalresultwritearg_1,
-    TAIcsvwriteextra_1,
-    TAIcsvfetchextra_1,
-    TAIxmlparsearg_1,
-    TAIxmlfetchextra_1,
-    TAIxmlwriteextra_1,
-    TAIsoapactionarg_1,
-    TAIsoapcallextra_1,
-    TAIparsearg_1,
-    TAIcsvreadarg_1,
-    TAIxmlreadarg_1,
-    TAIchildnormalizearg_1,
-    TAIchildaggregatearg_1,
-    TAIchildgroupaggregatearg_1,
-    TAIchildthroughnormalizebasearg_1,
-    TAIcompoundsourceiteratorarg_1,
-    TAIfetchcontext_1,
-    TAIfetchbasearg_1,
-    TAIcompoundbasearg_1,
-    TAIindexreadbasearg_1,
-    TAIdiskreadbasearg_1,
-    TAIcompoundextra_1,
-    TAIcompoundreadextra_1,
-    TAIcompoundnormalizeextra_1,
-    TAIcompoundaggregateextra_1,
-    TAIcompoundcountextra_1,
-    TAIrowaggregator_1,
-    TAIcompoundgroupaggregateextra_1,
-    TAIsimplediskreadarg_1,
-    TAIlooparg_1,
-    TAIremotearg_1,
-    TAIlibrarycallarg_1,
-    TAIprocessarg_1,
-    TAIrawiteratorarg_1,
-    TAIgraphlooparg_1,
-    TAIgraphloopresultreadarg_1,
-    TAIgraphloopresultwritearg_1,
-    TAInwayinputarg_1,
-    TAInwaymergearg_1,
-    TAInwaymergejoinarg_1,
-    TAInwayjoinarg_1,
-    TAInwaymergeextra_1,
-    TAInwaygraphloopresultreadarg_1,
-    TAInwayselectarg_1,
-    TAIalgorithm_1,
-    TAInonemptyarg_1,
-    TAIfiltergrouparg_1,
-    TAIsourcelimittransformextra_1,
-    TAIlimittransformextra_1,
-    TAIsequentialarg_1,
-    TAIparallelarg_1,
-    TAIsourcecountlimit_1,
-    TAIprefetchprojectarg_1,
-    TAIsectionarg_1,
-    TAIlinkedrawiteratorarg_1,
-    TAInormalizelinkedchildarg_1,
-    TAIfilterprojectarg_1,
-    TAIsteppedsourceextra_1,
-    TAIcatcharg_1,
-    TAIsectioninputarg_1,
-    TAIwhenactionarg_1,
-    TAIcountrowaggregator_1,
-    TAIstreamediteratorarg_1,
-    TAIexternal_1,
-    TAIinlinetablearg_1,
-    TAIsubsortextra_1,
-    TAIdictionaryworkunitwritearg_1,
-    TAIdictionaryresultwritearg_1,
-    TAItracearg_1,
-    TAIquantilearg_1,
-
-    //Should remain as last of all meaningful tags, but before aliases
-    TAImax,
-
-//Only aliases follow - for interfaces implemented via typedefs
-    TAIgroupiteratearg_1 = TAIiteratearg_1,
-    TAIkeyeddenormalizearg_1 = TAIkeyedjoinbasearg_1,
-    TAIkeyeddenormalizegrouparg_1 = TAIkeyedjoinbasearg_1,
-    TAIalldenormalizearg_1 = TAIalljoinarg_1,
-    TAIalldenormalizegrouparg_1 = TAIalljoinarg_1,
-    TAIlocalresultspillarg_1 = TAIlocalresultwritearg_1,
-};
-
 struct ISortKeySerializer
 {
     virtual size32_t keyToRecord(ARowBuilder & rowBuilder, const void * _key, size32_t & recordSize) = 0;       // both return size of key!
@@ -1146,12 +1001,10 @@ interface IHThorArg : public IInterface
 {
     virtual IOutputMetaData * queryOutputMeta() = 0;
 
-    virtual void onCreate(ICodeContext * ctx, IHThorArg * colocalParent, MemoryBuffer * serializedCreate)   {}
-    virtual void serializeCreateContext(MemoryBuffer & out)                             {}
-    virtual void onStart(const byte * parentExtract, MemoryBuffer * serializedStart)    {}
-    virtual void serializeStartContext(MemoryBuffer & out)                              {}
-
-    virtual IInterface * selectInterface(ActivityInterfaceEnum which)                       { return NULL; }
+    virtual void onCreate(ICodeContext * ctx, IHThorArg * colocalParent, MemoryBuffer * serializedCreate) = 0;
+    virtual void serializeCreateContext(MemoryBuffer & out) = 0;
+    virtual void onStart(const byte * parentExtract, MemoryBuffer * serializedStart) = 0;
+    virtual void serializeStartContext(MemoryBuffer & out) = 0;
 };
 
 typedef IHThorArg * (*EclHelperFactory)();
@@ -1259,7 +1112,6 @@ struct IHThorIndexWriteArg : public IHThorArg
     virtual const char * queryRecordECL() = 0;
     virtual unsigned getFlags() = 0;
     virtual size32_t transform(ARowBuilder & rowBuilder, const void * src, IBlobCreator * blobs, unsigned __int64 & filepos) = 0;   //NB: returns size
-    virtual const char * getDatasetName() = 0;   // Never used, left in to preserve VMT layout only
     virtual const char * getDistributeIndexName() = 0;
     virtual unsigned getKeyedSize() = 0;
     virtual unsigned getExpiryDays() = 0;
@@ -1442,10 +1294,6 @@ struct IHThorLimitArg : public IHThorArg
 {
     virtual unsigned __int64 getRowLimit() = 0;
     virtual void onLimitExceeded() = 0;
-};
-
-struct IHThorLimitTransformExtra : public IInterface
-{
     virtual size32_t transformOnLimitExceeded(ARowBuilder & rowBuilder) = 0;
 };
 
@@ -1683,10 +1531,6 @@ struct IHThorSortArg : public IHThorArg
     virtual bool hasManyRecords() = 0;
     virtual double getTargetSkew() = 0;
     virtual ICompare * queryCompareSerializedRow()=0;                           // null if row already serialized, or if compare not available
-};
-
-struct IHThorAlgorithm : public IInterface
-{
     virtual unsigned getAlgorithmFlags() = 0;
     virtual const char * getAlgorithm() = 0;
 };
@@ -1777,9 +1621,9 @@ struct IHThorAnyJoinBaseArg : public IHThorArg
 
 //Join:
 //Denormalize
-    virtual size32_t transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _count, unsigned _flags) { return 0; }
+    virtual size32_t transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _count, unsigned _flags) = 0;
 //Denormalize group
-    virtual size32_t transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _numRows, const void * * _rows, unsigned _flags) { return 0; }
+    virtual size32_t transform(ARowBuilder & rowBuilder, const void * _left, const void * _right, unsigned _numRows, const void * * _rows, unsigned _flags) = 0;
 
     inline bool isLeftAlreadyLocallySorted() { return (getJoinFlags() & JFleftSortedLocally) != 0; }
     inline bool isRightAlreadyLocallySorted() { return (getJoinFlags() & JFrightSortedLocally) != 0; }
@@ -1803,12 +1647,12 @@ struct IHThorJoinBaseArg : public IHThorAnyJoinBaseArg
     virtual ICompare * queryCompareLeftRightUpper() = 0;
     virtual ICompare * queryPrefixCompare() = 0;
 
-    virtual size32_t onFailTransform(ARowBuilder & rowBuilder, const void * _left, const void * _right, IException * e, unsigned flags) { return 0; }
+    virtual size32_t onFailTransform(ARowBuilder & rowBuilder, const void * _left, const void * _right, IException * e, unsigned flags) = 0;
     virtual ICompare * queryCompareLeftKeyRightRow()=0;                         // compare serialized left key with right row
     virtual ICompare * queryCompareRightKeyLeftRow()=0;                         // as above if partition right selected
 };
 
-struct IHThorFetchContext : public IInterface
+struct IHThorFetchContext
 {
     virtual unsigned __int64 extractPosition(const void * _right) = 0;  // Gets file position value from rhs row
     virtual const char * getFileName() = 0;                 // Returns filename of raw file fpos'es refer into
@@ -1908,7 +1752,7 @@ struct IHThorKeyedDistributeArg : public IHThorArg
 };
 
 
-struct IHThorFetchBaseArg : public IHThorArg
+struct IHThorFetchBaseArg : public IHThorArg, public IHThorFetchContext
 {
     virtual unsigned __int64 getRowLimit() { return (unsigned __int64) -1; }
     virtual void onLimitExceeded()         { }
@@ -1923,7 +1767,7 @@ struct IHThorBinFetchExtra : public IInterface
     virtual size32_t transform(ARowBuilder & rowBuilder, const void * _raw, const void * _key, unsigned __int64 _fpos) = 0;
 };
 
-struct IHThorFetchArg : public IHThorFetchBaseArg, public IHThorFetchContext, public IHThorBinFetchExtra
+struct IHThorFetchArg : public IHThorFetchBaseArg, public IHThorBinFetchExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2128,7 +1972,7 @@ struct IHThorCsvFetchExtra: public IInterface
     virtual size32_t transform(ARowBuilder & rowBuilder, unsigned * lenLeft, const char * * dataLeft, const void * _key, unsigned __int64 _fpos) = 0;
 };
 
-struct IHThorCsvFetchArg : public IHThorFetchBaseArg, public IHThorFetchContext, public IHThorCsvFetchExtra
+struct IHThorCsvFetchArg : public IHThorFetchBaseArg, public IHThorCsvFetchExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2150,7 +1994,7 @@ struct IHThorXmlFetchExtra : public IInterface
     virtual bool requiresContents() { return false; }
 };
 
-struct IHThorXmlFetchArg : public IHThorFetchBaseArg, public IHThorFetchContext, public IHThorXmlFetchExtra
+struct IHThorXmlFetchArg : public IHThorFetchBaseArg, public IHThorXmlFetchExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2250,39 +2094,33 @@ struct IHThorWebServiceCallActionArg : public IHThorArg
 
 //writing to the soap service.
     virtual void toXML(const byte * self, IXmlWriter & out) = 0;
-    virtual const char * getHeader()                  { return NULL; }
-    virtual const char * getFooter()                  { return NULL; }
+    virtual const char * getHeader() = 0;
+    virtual const char * getFooter() = 0;
     virtual unsigned getFlags() = 0;
-    virtual unsigned numParallelThreads()               { return 0; }
-    virtual unsigned numRecordsPerBatch()               { return 0; }
-    virtual int numRetries()                             { return -1; }
-    virtual double getTimeout()                         { return (double)-1.0; }
-    virtual double getTimeLimit()                       { return (double)0.0; }
-    virtual const char * getSoapAction()              { return NULL; }
-    virtual const char * getNamespaceName()           { return NULL; }
-    virtual const char * getNamespaceVar()            { return NULL; }
-    virtual const char * getHttpHeaderName()          { return NULL; }
-    virtual const char * getHttpHeaderValue()         { return NULL; }
-    virtual const char * getProxyAddress()            { return NULL; }
-    virtual const char * getAcceptType()              { return NULL; }
-    virtual const char * getHttpHeaders()             { return NULL; }
-};
-typedef IHThorWebServiceCallActionArg IHThorSoapActionArg ;
-typedef IHThorWebServiceCallActionArg IHThorHttpActionArg ;
+    virtual unsigned numParallelThreads() = 0;
+    virtual unsigned numRecordsPerBatch() = 0;
+    virtual int numRetries() = 0;
+    virtual double getTimeout() = 0;
+    virtual double getTimeLimit() = 0;
+    virtual const char * getSoapAction() = 0;
+    virtual const char * getNamespaceName() = 0;
+    virtual const char * getNamespaceVar() = 0;
+    virtual const char * getHttpHeaderName() = 0;
+    virtual const char * getHttpHeaderValue() = 0;
+    virtual const char * getProxyAddress() = 0;
+    virtual const char * getAcceptType() = 0;
+    virtual const char * getHttpHeaders() = 0;
 
-
-struct IHThorWebServiceCallExtra : public IInterface
-{
     virtual IXmlToRowTransformer * queryInputTransformer() = 0;
-    virtual const char * getInputIteratorPath()       { return NULL; }
-    virtual size32_t onFailTransform(ARowBuilder & rowBuilder, const void * left, IException * e) { return 0; }
+    virtual const char * getInputIteratorPath() = 0;
+    virtual size32_t onFailTransform(ARowBuilder & rowBuilder, const void * left, IException * e) = 0;
     virtual void getLogText(size32_t & lenText, char * & text, const void * left) = 0;  // iff SOAPFlogusermsg set
 };
-typedef IHThorWebServiceCallExtra IHThorSoapCallExtra;
+typedef IHThorWebServiceCallActionArg IHThorSoapActionArg ;
+typedef IHThorWebServiceCallActionArg IHThorHttpActionArg ;
 
-struct IHThorWebServiceCallArg : public IHThorWebServiceCallActionArg, public IHThorWebServiceCallExtra
+class IHThorWebServiceCallArg : public IHThorWebServiceCallActionArg
 {
-    COMMON_NEWTHOR_FUNCTIONS
 };
 typedef IHThorWebServiceCallArg IHThorSoapCallArg ;
 typedef IHThorWebServiceCallArg IHThorHttpCallArg ;
@@ -2394,7 +2232,7 @@ enum
     SSFisjoin           = 0x0008,
 };
 
-interface IHThorSteppedSourceExtra : extends IInterface
+interface IHThorSteppedSourceExtra
 {
     virtual unsigned getSteppedFlags() = 0;
     virtual double getPriority() = 0;
@@ -2422,6 +2260,7 @@ struct IHThorIndexReadBaseArg : extends IHThorCompoundBaseArg
     virtual bool getIndexLayout(size32_t & _retLen, void * & _retData) = 0;
 
     inline bool hasSegmentMonitors()                        { return (getFlags() & TIRnofilter) == 0; }
+    virtual IHThorSteppedSourceExtra *querySteppingExtra()  { return NULL; }
 };
 
 struct IHThorDiskReadBaseArg : extends IHThorCompoundBaseArg
@@ -2525,12 +2364,12 @@ struct IHThorCompoundGroupAggregateExtra : implements IHThorHashAggregateExtra,
 
 //------------------------- Concrete definitions -------------------------
 
-//Note, the implementations may also implement IHThorSourceLimitTransformExtra
-struct IHThorIndexReadArg : extends IHThorIndexReadBaseArg, extends IHThorCompoundReadExtra 
+struct IHThorIndexReadArg : extends IHThorIndexReadBaseArg, extends IHThorSourceLimitTransformExtra, extends IHThorCompoundReadExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
-struct IHThorIndexNormalizeArg : extends IHThorIndexReadBaseArg, extends IHThorCompoundNormalizeExtra
+
+struct IHThorIndexNormalizeArg : extends IHThorIndexReadBaseArg, extends IHThorSourceLimitTransformExtra, extends IHThorCompoundNormalizeExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2540,7 +2379,7 @@ struct IHThorIndexAggregateArg : extends IHThorIndexReadBaseArg, extends IHThorC
     COMMON_NEWTHOR_FUNCTIONS
 };
 
-struct IHThorIndexCountArg : extends IHThorIndexReadBaseArg, extends IHThorCompoundCountExtra
+struct IHThorIndexCountArg : extends IHThorIndexReadBaseArg, extends IHThorCompoundCountExtra, extends IHThorSourceCountLimit
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2551,12 +2390,12 @@ struct IHThorIndexGroupAggregateArg : extends IHThorIndexReadBaseArg, extends IH
 };
 
 
-struct IHThorDiskReadArg : extends IHThorDiskReadBaseArg, extends IHThorCompoundReadExtra
+struct IHThorDiskReadArg : extends IHThorDiskReadBaseArg, extends IHThorSourceLimitTransformExtra, extends IHThorCompoundReadExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
 
-struct IHThorDiskNormalizeArg : extends IHThorDiskReadBaseArg, extends IHThorCompoundNormalizeExtra
+struct IHThorDiskNormalizeArg : extends IHThorDiskReadBaseArg, extends IHThorSourceLimitTransformExtra, extends IHThorCompoundNormalizeExtra
 {
     COMMON_NEWTHOR_FUNCTIONS
 };
@@ -2566,7 +2405,7 @@ struct IHThorDiskAggregateArg : extends IHThorDiskReadBaseArg, extends IHThorCom
     COMMON_NEWTHOR_FUNCTIONS
 };
 
-struct IHThorDiskCountArg : extends IHThorDiskReadBaseArg, extends IHThorCompoundCountExtra
+struct IHThorDiskCountArg : extends IHThorDiskReadBaseArg, extends IHThorCompoundCountExtra, extends IHThorSourceCountLimit
 {
     COMMON_NEWTHOR_FUNCTIONS
 };

文件差异内容过多而无法显示
+ 634 - 2783
rtl/include/eclhelper_base.hpp


+ 1 - 3
thorlcr/activities/fetch/thfetch.cpp

@@ -33,7 +33,6 @@ class CFetchActivityMaster : public CMasterActivity
 
 protected:
     IHThorFetchArg *helper;
-    IHThorFetchContext *fetchContext;
 
 public:
     CFetchActivityMaster(CMasterGraphElement *info) : CMasterActivity(info)
@@ -42,8 +41,7 @@ public:
         if (!container.queryLocalOrGrouped())
             mpTag = container.queryJob().allocateMPTag();
         helper = (IHThorFetchArg *)queryHelper();
-        fetchContext = static_cast<IHThorFetchContext *>(helper->selectInterface(TAIfetchcontext_1));
-        reInit = 0 != (fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename));
+        reInit = 0 != (helper->getFetchFlags() & (FFvarfilename|FFdynamicfilename));
     }
     ~CFetchActivityMaster()
     {

+ 13 - 16
thorlcr/activities/fetch/thfetchslave.cpp

@@ -286,7 +286,6 @@ protected:
     Owned<IThorRowInterfaces> fetchDiskRowIf;
     IFetchStream *fetchStream = nullptr;
     IHThorFetchBaseArg *fetchBaseHelper;
-    IHThorFetchContext *fetchContext;
     unsigned files = 0;
     CPartDescriptorArray parts;
     IRowStream *keyIn = nullptr;
@@ -299,8 +298,7 @@ public:
     CFetchSlaveBase(CGraphElementBase *_container) : CSlaveActivity(_container)
     {
         fetchBaseHelper = (IHThorFetchBaseArg *)queryHelper();
-        fetchContext = static_cast<IHThorFetchContext *>(fetchBaseHelper->selectInterface(TAIfetchcontext_1));
-        reInit = 0 != (fetchContext->getFetchFlags() & (FFvarfilename|FFdynamicfilename));
+        reInit = 0 != (fetchBaseHelper->getFetchFlags() & (FFvarfilename|FFdynamicfilename));
         appendOutputLinked(this);
     }
     ~CFetchSlaveBase()
@@ -333,7 +331,7 @@ public:
 
         unsigned encryptedKeyLen;
         void *encryptedKey;
-        fetchContext->getFileEncryptKey(encryptedKeyLen,encryptedKey);
+        fetchBaseHelper->getFileEncryptKey(encryptedKeyLen,encryptedKey);
         if (0 != encryptedKeyLen)
         {
             bool dfsEncrypted = files?parts.item(0).queryOwner().queryProperties().getPropBool("@encrypted"):false;
@@ -342,7 +340,7 @@ public:
             memset(encryptedKey, 0, encryptedKeyLen);
             free(encryptedKey);
         }
-        fetchDiskRowIf.setown(createRowInterfaces(fetchContext->queryDiskRecordSize()));
+        fetchDiskRowIf.setown(createRowInterfaces(fetchBaseHelper->queryDiskRecordSize()));
     }
 
     virtual void initializeFileParts()
@@ -374,12 +372,11 @@ public:
             IRowStream &in;
             unsigned maxInSize;
             IHThorFetchBaseArg &fetchBaseHelper;
-            IHThorFetchContext &fetchContext;
 
         public:
             IMPLEMENT_IINTERFACE_USING(CSimpleInterface);
 
-            CKeyFieldExtractBase(CFetchSlaveBase *_activity, IRowStream &_in, IHThorFetchBaseArg &_fetchBaseHelper, IHThorFetchContext & _fetchContext) : activity(_activity), in(_in), fetchBaseHelper(_fetchBaseHelper), fetchContext(_fetchContext)
+            CKeyFieldExtractBase(CFetchSlaveBase *_activity, IRowStream &_in, IHThorFetchBaseArg &_fetchBaseHelper) : activity(_activity), in(_in), fetchBaseHelper(_fetchBaseHelper)
             {
             }
             virtual ~CKeyFieldExtractBase() {}
@@ -395,8 +392,8 @@ public:
             class CKeyFieldExtract : public CKeyFieldExtractBase
             {
             public:
-                CKeyFieldExtract(CFetchSlaveBase *activity, IRowStream &in, IHThorFetchBaseArg &fetchBaseHelper, IHThorFetchContext & fetchContext)
-                    : CKeyFieldExtractBase(activity, in, fetchBaseHelper, fetchContext)
+                CKeyFieldExtract(CFetchSlaveBase *activity, IRowStream &in, IHThorFetchBaseArg &fetchBaseHelper)
+                    : CKeyFieldExtractBase(activity, in, fetchBaseHelper)
                 {
                 }
                 virtual ~CKeyFieldExtract() {}
@@ -421,7 +418,7 @@ public:
             }
             else
             {
-                keyIn = new CKeyFieldExtract(this, *inputStream, *fetchBaseHelper, *fetchContext);
+                keyIn = new CKeyFieldExtract(this, *inputStream, *fetchBaseHelper);
                 keyInMeta.set(QUERYINTERFACE(fetchBaseHelper->queryExtractedSize(), IOutputMetaData));
             }
             keyInIf.setown(createRowInterfaces(keyInMeta));
@@ -432,8 +429,8 @@ public:
             {
                 Linked<IThorRowInterfaces> rowif;
             public:
-                CKeyFPosExtract(IThorRowInterfaces *_rowif, CFetchSlaveBase *activity, IRowStream &in, IHThorFetchBaseArg &fetchBaseHelper, IHThorFetchContext & fetchContext)
-                    : CKeyFieldExtractBase(activity, in, fetchBaseHelper, fetchContext), rowif(_rowif)
+                CKeyFPosExtract(IThorRowInterfaces *_rowif, CFetchSlaveBase *activity, IRowStream &in, IHThorFetchBaseArg &fetchBaseHelper)
+                    : CKeyFieldExtractBase(activity, in, fetchBaseHelper), rowif(_rowif)
                 {
                 }
             
@@ -445,7 +442,7 @@ public:
                     if (inRow)
                     {
                         OwnedConstThorRow row;
-                        unsigned __int64 fpos = fetchContext.extractPosition(inRow.get());
+                        unsigned __int64 fpos = fetchBaseHelper.extractPosition(inRow.get());
                         row.deserialize(rowif, sizeof(fpos), &fpos);
                         return row.getClear();
                     }
@@ -454,11 +451,11 @@ public:
             };
             Owned<IOutputMetaData> fmeta = createFixedSizeMetaData(sizeof(offset_t)); // should be provided by Gavin?
             keyInIf.setown(createRowInterfaces(fmeta));
-            keyIn = new CKeyFPosExtract(keyInIf, this, *inputStream, *fetchBaseHelper, *fetchContext);
+            keyIn = new CKeyFPosExtract(keyInIf, this, *inputStream, *fetchBaseHelper);
         }
 
         Owned<IThorRowInterfaces> rowIf = createRowInterfaces(queryRowMetaData());
-        fetchStream = createFetchStream(*this, keyInIf, rowIf, abortSoon, fetchContext->getFileName(), parts, offsetCount, offsetMapSz, offsetMapBytes.toByteArray(), this, mptag, eexp);
+        fetchStream = createFetchStream(*this, keyInIf, rowIf, abortSoon, fetchBaseHelper->getFileName(), parts, offsetCount, offsetMapSz, offsetMapBytes.toByteArray(), this, mptag, eexp);
         fetchStreamOut = fetchStream->queryOutput();
         fetchStream->start(keyIn);
         initializeFileParts();
@@ -503,7 +500,7 @@ public:
     virtual offset_t extractFpos(const void *key)
     {
         if (indexRowExtractNeeded)
-            return fetchContext->extractPosition(key);
+            return fetchBaseHelper->extractPosition(key);
         else
         {
             offset_t fpos;

+ 1 - 1
thorlcr/activities/hashdistrib/thhashdistribslave.cpp

@@ -4363,7 +4363,7 @@ public:
         info.canStall = true;
         // maybe more?
     }
-// IHThorRowAggregator impl. - JCSMORE more until aggregator allows selectInterface to return.
+// IHThorRowAggregator impl
     virtual size32_t clearAggregate(ARowBuilder & rowBuilder) override { return helper->clearAggregate(rowBuilder); }
     virtual size32_t processFirst(ARowBuilder & rowBuilder, const void * src) override { return helper->processFirst(rowBuilder, src); }
     virtual size32_t processNext(ARowBuilder & rowBuilder, const void * src) override { return helper->processNext(rowBuilder, src); }

+ 4 - 2
thorlcr/activities/indexread/thindexreadslave.cpp

@@ -165,7 +165,7 @@ public:
         : CSlaveActivity(container)
     {
         helper = (IHThorIndexReadBaseArg *)container->queryHelper();
-        limitTransformExtra = static_cast<IHThorSourceLimitTransformExtra *>(helper->selectInterface(TAIsourcelimittransformextra_1));
+        limitTransformExtra = nullptr;
         fixedDiskRecordSize = helper->queryDiskRecordSize()->querySerializedDiskMeta()->getFixedSize(); // 0 if variable and unused
         reInit = 0 != (helper->getFlags() & (TIRvarfilename|TIRdynamicfilename));
     }
@@ -458,9 +458,10 @@ public:
     CIndexReadSlaveActivity(CGraphElementBase *_container) : CIndexReadSlaveBase(_container)
     {
         helper = (IHThorIndexReadArg *)queryContainer().queryHelper();
+        limitTransformExtra = helper;
         rawMeta = helper->queryRawSteppingMeta();
         projectedMeta = helper->queryProjectedSteppingMeta();
-        steppedExtra = static_cast<IHThorSteppedSourceExtra *>(helper->selectInterface(TAIsteppedsourceextra_1));
+        steppedExtra = helper->querySteppingExtra();
         optimizeSteppedPostFilter = (helper->getFlags() & TIRunfilteredtransform) != 0;
         steppingEnabled = 0 != container.queryJob().getWorkUnitValueInt("steppingEnabled", 0);
         if (rawMeta)
@@ -921,6 +922,7 @@ public:
     CIndexNormalizeSlaveActivity(CGraphElementBase *_container) : CIndexReadSlaveBase(_container)
     {
         helper = (IHThorIndexNormalizeArg *)container.queryHelper();
+        limitTransformExtra = helper;
         appendOutputLinked(this);
     }
 

+ 1 - 2
thorlcr/activities/join/thjoinslave.cpp

@@ -94,8 +94,7 @@ class JoinSlaveActivity : public CSlaveActivity, implements ILookAheadStopNotify
     bool isUnstable()
     {
         // actually don't think currently supported by join but maybe will be sometime
-        IHThorAlgorithm * algo = helper?(static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1))):NULL;
-        return (algo&&algo->getAlgorithmFlags()&TAFunstable);
+        return false;
     }
 
     class cRowStreamPlus1Adaptor: implements IRowStream, public CSimpleInterface

+ 2 - 6
thorlcr/activities/limit/thlimitslave.cpp

@@ -165,7 +165,6 @@ class CSkipLimitSlaveActivity : public CLimitSlaveActivityBase
     UnsignedArray sizeArray;
     size32_t ptrIndex;
     bool limitChecked, eof, rowTransform;
-    IHThorLimitTransformExtra *helperex;
     Owned<IRowWriterMultiReader> buf;
     Owned<IRowStream> reader;
 
@@ -225,9 +224,6 @@ public:
         ptrIndex = 0;
         limitChecked = eof = false;
         rowTransform = _rowTransform;
-        helperex = NULL;
-        if (rowTransform)
-            helperex = static_cast<IHThorLimitTransformExtra *>(queryHelper()->selectInterface(TAIlimittransformextra_1));
     }
     void abort()
     {
@@ -251,12 +247,12 @@ public:
             if (!gather())
             {
                 eof = true;
-                if (rowTransform&&helperex && firstNode())
+                if (rowTransform && firstNode())
                 {
                     try
                     {
                         RtlDynamicRowBuilder ret(queryRowAllocator());
-                        size32_t sizeGot = helperex->transformOnLimitExceeded(ret);
+                        size32_t sizeGot = helper->transformOnLimitExceeded(ret);
                         if (sizeGot)
                         {
                             dataLinkIncrement();

+ 1 - 2
thorlcr/activities/msort/thgroupsortslave.cpp

@@ -48,8 +48,7 @@ public:
     {
         helper = (IHThorSortArg *)queryHelper();
         iCompare = helper->queryCompare();
-        IHThorAlgorithm * algo = helper?(static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1))):NULL;
-        unstable = (algo&&(algo->getAlgorithmFlags()&TAFunstable));
+        unstable = helper->getAlgorithmFlags()&TAFunstable;
         setRequireInitData(false);
         appendOutputLinked(this);
     }

+ 4 - 6
thorlcr/activities/msort/thmsort.cpp

@@ -60,9 +60,8 @@ public:
     {
         CSortBaseActivityMaster::init();
         IHThorSortArg *helper = (IHThorSortArg *)queryHelper();
-        IHThorAlgorithm *algo = static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1));
-        OwnedRoxieString algoname = algo->getAlgorithm();
-        unsigned flags = algo->getAlgorithmFlags();
+        OwnedRoxieString algoname = helper->getAlgorithm();
+        unsigned flags = helper->getAlgorithmFlags();
         if (algoname && (0 != stricmp(algoname, "quicksort")))
         {
             Owned<IException> e = MakeActivityException(this, 0, "Ignoring, unsupported sort order algorithm '%s'", algoname.get());
@@ -97,9 +96,8 @@ protected:
     {
         CSortBaseActivityMaster::init();
         IHThorSortArg *helper = (IHThorSortArg *)queryHelper();
-        IHThorAlgorithm *algo = static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1));
-        OwnedRoxieString algoname(algo->getAlgorithm());
-        unsigned flags = algo->getAlgorithmFlags();
+        OwnedRoxieString algoname(helper->getAlgorithm());
+        unsigned flags = helper->getAlgorithmFlags();
         if (algoname && (0 != stricmp(algoname, "quicksort")))
         {
             Owned<IException> e = MakeActivityException(this, 0, "Ignoring, unsupported sort order algorithm '%s'", algoname.get());

+ 1 - 2
thorlcr/activities/msort/thmsortslave.cpp

@@ -53,8 +53,7 @@ class MSortSlaveActivity : public CSlaveActivity
 
     bool isUnstable()
     {
-        IHThorAlgorithm * algo = helper?(static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1))):NULL;
-        return (algo&&algo->getAlgorithmFlags()&TAFunstable);
+        return (helper&&helper->getAlgorithmFlags()&TAFunstable);
     }
 
 public:

+ 1 - 2
thorlcr/activities/selfjoin/thselfjoinslave.cpp

@@ -54,8 +54,7 @@ private:
     bool isUnstable()
     {
         // actually don't think currently supported by join but maybe will be sometime
-        IHThorAlgorithm * algo = helper?(static_cast<IHThorAlgorithm *>(helper->selectInterface(TAIalgorithm_1))):NULL;
-        return (algo&&algo->getAlgorithmFlags()&TAFunstable);
+        return false;
     }