Pārlūkot izejas kodu

HPCC-11852 Remove calls to getDatasetName from indexwrite

Prevent generation of this virtual, and mark it as deprecated in the VMT and
the grammar.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 11 gadi atpakaļ
vecāks
revīzija
8562487e2f

+ 1 - 0
ecl/hql/hqlgram.y

@@ -2815,6 +2815,7 @@ buildFlag
                         }
     | DATASET '(' dataSet ')'
                         {
+                            parser->reportWarning(CategoryDeprecated, ERR_DEPRECATED, $1.pos, "DATASET attribute on index is deprecated, and has no effect");
                             OwnedHqlExpr ds = $3.getExpr();
                             if (ds->getOperator() != no_table)
                                 parser->reportError(ERR_EXPECTED_DATASET, $3, "Expected parameter to be a DATASET definition");

+ 0 - 5
ecl/hqlcpp/hqlhtcpp.cpp

@@ -10140,11 +10140,6 @@ ABoundActivity * HqlCppTranslator::doBuildActivityOutputIndex(BuildCtx & ctx, IH
     //virtual const char * getFileName() { return "x.d00"; }
     buildFilenameFunction(*instance, instance->startctx, "getFileName", filename, hasDynamicFilename(expr));
 
-    //virtual const char * getDatasetName() { return "x.d00"; }
-    IHqlExpression * tableName = expr->queryAttribute(nameAtom);
-    if (tableName)
-        doBuildVarStringFunction(instance->startctx, "getDatasetName", tableName->queryChild(0));
-
     //virtual unsigned getFlags() = 0;
     IHqlExpression * updateAttr = expr->queryAttribute(updateAtom);
     IHqlExpression * compressAttr = expr->queryAttribute(compressedAtom);

+ 1 - 1
rtl/include/eclhelper.hpp

@@ -1196,7 +1196,7 @@ 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;
+    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;

+ 1 - 1
rtl/include/eclhelper_base.hpp

@@ -358,7 +358,7 @@ public:
     }
 
     virtual unsigned getFlags()                             { return 0; }
-    virtual const char * getDatasetName()                   { return NULL; }
+    virtual const char * getDatasetName()                   { return NULL; }  // Never used, left in to keep VMT unchanged only
     virtual const char * getDistributeIndexName()           { return NULL; }
     virtual unsigned getExpiryDays()                        { return 0; }
     virtual void getUpdateCRCs(unsigned & eclCRC, unsigned __int64 & totalCRC)  { }