From b6df4c91ab4a839c043fca94153b548921c72ee1 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Wed, 26 Jun 2024 14:16:38 +0100 Subject: [PATCH] HPCC-32031 Generate summary information in workunit to speed up file list operations Further changes following review Signed-off-by: Richard Chapman --- common/pkgfiles/referencedfilelist.cpp | 1 - common/workunit/workunit.cpp | 3 +-- common/workunit/workunit.hpp | 3 +-- ecl/hqlcpp/hqlhtcpp.cpp | 2 +- ecl/hqlcpp/hqlsource.cpp | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/common/pkgfiles/referencedfilelist.cpp b/common/pkgfiles/referencedfilelist.cpp index 3c0a2afa523..07a0eb69f4d 100644 --- a/common/pkgfiles/referencedfilelist.cpp +++ b/common/pkgfiles/referencedfilelist.cpp @@ -968,7 +968,6 @@ bool ReferencedFileList::addFilesFromQuery(IConstWorkUnit *cw, const IHpccPackag SummaryMap files; if (cw->getSummary(SummaryType::ReadFile, files) && cw->getSummary(SummaryType::ReadIndex, files)) - // MORE - should this also include ReadPersist? { for (const auto& [lName, isOpt] : files) { diff --git a/common/workunit/workunit.cpp b/common/workunit/workunit.cpp index ccdd5157d15..64691c3d75d 100644 --- a/common/workunit/workunit.cpp +++ b/common/workunit/workunit.cpp @@ -8731,10 +8731,9 @@ static const char *summaryTypeName(SummaryType type) { case SummaryType::ReadFile: return "ReadFile"; case SummaryType::ReadIndex: return "ReadIndex"; - case SummaryType::ReadPersist: return "ReadPersist"; case SummaryType::WriteFile: return "WriteFile"; case SummaryType::WriteIndex: return "WriteIndex"; - case SummaryType::WritePersist: return "WritePersist"; + case SummaryType::PersistFile: return "PersistFile"; case SummaryType::SpillFile: return "SpillFile"; case SummaryType::JobTemp: return "JobTemp"; case SummaryType::Service: return "Service"; diff --git a/common/workunit/workunit.hpp b/common/workunit/workunit.hpp index 04d9f9414c8..b30fb1805f3 100644 --- a/common/workunit/workunit.hpp +++ b/common/workunit/workunit.hpp @@ -1187,10 +1187,9 @@ enum class SummaryType First, ReadFile = First, ReadIndex, - ReadPersist, WriteFile, WriteIndex, - WritePersist, + PersistFile, SpillFile, JobTemp, Service, diff --git a/ecl/hqlcpp/hqlhtcpp.cpp b/ecl/hqlcpp/hqlhtcpp.cpp index 752fce4eb80..6e91f26ee3a 100644 --- a/ecl/hqlcpp/hqlhtcpp.cpp +++ b/ecl/hqlcpp/hqlhtcpp.cpp @@ -10983,7 +10983,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityOutput(BuildCtx & ctx, IHqlExp if (expr->hasAttribute(jobTempAtom)) summaryType = SummaryType::JobTemp; else if (expr->hasAttribute(_workflowPersist_Atom)) - summaryType = SummaryType::WritePersist; + summaryType = SummaryType::PersistFile; bool useImplementationClass = options.minimizeActivityClasses && targetRoxie() && expr->hasAttribute(_spill_Atom); Owned instance = new ActivityInstance(*this, ctx, kind, expr, activityArgName); diff --git a/ecl/hqlcpp/hqlsource.cpp b/ecl/hqlcpp/hqlsource.cpp index 3500237e680..5a5ffd054fb 100644 --- a/ecl/hqlcpp/hqlsource.cpp +++ b/ecl/hqlcpp/hqlsource.cpp @@ -1191,7 +1191,7 @@ void SourceBuilder::buildFilenameMember() if (tableExpr->hasAttribute(jobTempAtom)) summaryType = SummaryType::JobTemp; else if (tableExpr->hasAttribute(_workflowPersist_Atom)) - summaryType = SummaryType::ReadPersist; + summaryType = SummaryType::PersistFile; translator.buildFilenameFunction(*instance, instance->startctx, WaFilename, "getFileName", nameExpr, translator.hasDynamicFilename(tableExpr), summaryType, tableExpr->hasAttribute(optAtom)); }