Skip to content

Commit

Permalink
DPL Analysis: fix internal indices not properly bound when grouping i…
Browse files Browse the repository at this point in the history
…s used
  • Loading branch information
aalkin authored and ktf committed Feb 6, 2024
1 parent 6a53a5e commit f4af221
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions Framework/Core/include/Framework/AnalysisTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ struct AnalysisDataProcessorBuilder {
return true;
},
task);

overwriteInternalIndices(associatedTables, associatedTables);
if constexpr (soa::is_soa_iterator_v<std::decay_t<G>>) {
auto slicer = GroupSlicer(groupingTable, associatedTables, slices);
for (auto& slice : slicer) {
Expand All @@ -406,7 +406,6 @@ struct AnalysisDataProcessorBuilder {
invokeProcessWithArgsGeneric(task, processingFunction, slice.groupingElement(), associatedSlices);
}
} else {
overwriteInternalIndices(associatedTables, associatedTables);
// bind partitions and grouping table
homogeneous_apply_refs([&groupingTable](auto& x) {
PartitionManager<std::decay_t<decltype(x)>>::bindExternalIndices(x, &groupingTable);
Expand Down
7 changes: 3 additions & 4 deletions Framework/Core/include/Framework/GroupSlicer.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ struct GroupSlicer {
return typedTable;

} else {
auto groupedElementsTable = originalTable.asArrowTable()->Slice(offset, count);
std::decay_t<A1> typedTable{{groupedElementsTable}, offset};
typedTable.bindInternalIndicesTo(&originalTable);
return typedTable;
auto groupedElementsTable = originalTable.rawSlice(offset, offset + count - 1);
groupedElementsTable.bindInternalIndicesTo(&originalTable);
return groupedElementsTable;
}
} else {
// generic split
Expand Down

0 comments on commit f4af221

Please sign in to comment.