Skip to content

Commit c749cd4

Browse files
committed
[RDF] Fix varied Defines not showing up in Snapshots.
RActionSnapshot did not create the varied versions of Defines. Therefore, Defines that implicitly depended on a variation were identical to nominal, and did not get snapshot. Here, the computation graph is JITted and the variations of Defines are created when the snapshot action gets created. Fix root-project#20506
1 parent eb5ecc3 commit c749cd4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tree/dataframe/inc/ROOT/RDF/RActionSnapshot.hxx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ class R__CLING_PTRCHECK(off) RActionSnapshot final : public RActionBase {
7474
const auto &prevVariations = nominalPrevNode->GetVariations();
7575
fPrevNodes.reserve(1 + currentVariations.size());
7676

77-
// Need to populate parts of the computation graph for which we have empty shells, e.g. RJittedFilters
78-
if (!currentVariations.empty())
79-
fLoopManager->Jit();
8077
for (const auto &variation : currentVariations) {
8178
if (IsStrInVec(variation, prevVariations)) {
8279
fPrevNodes.emplace_back(
@@ -105,7 +102,19 @@ public:
105102
fIsDefine.push_back(colRegister.IsDefineOrAlias(columns[i]));
106103

107104
if constexpr (std::is_same_v<Helper, SnapshotHelperWithVariations>) {
105+
// Need to populate parts of the computation graph for which we have empty shells, e.g. RJittedFilters and
106+
// varied Defines
107+
if (!GetVariations().empty())
108+
fLoopManager->Jit();
109+
108110
AppendVariedPrevNodes();
111+
112+
for (auto i = 0u; i < nColumns; ++i) {
113+
if (fIsDefine[i]) {
114+
auto define = colRegister.GetDefine(columns[i]);
115+
define->MakeVariations(GetVariations());
116+
}
117+
}
109118
}
110119
}
111120

0 commit comments

Comments
 (0)