From f4af221a7c0a9fd25bfa4500e2006391049f608a Mon Sep 17 00:00:00 2001 From: Anton Alkin Date: Mon, 5 Feb 2024 14:34:44 +0100 Subject: [PATCH] DPL Analysis: fix internal indices not properly bound when grouping is used --- Framework/Core/include/Framework/AnalysisTask.h | 3 +-- Framework/Core/include/Framework/GroupSlicer.h | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Framework/Core/include/Framework/AnalysisTask.h b/Framework/Core/include/Framework/AnalysisTask.h index 322521cd6246d..9809ed0068729 100644 --- a/Framework/Core/include/Framework/AnalysisTask.h +++ b/Framework/Core/include/Framework/AnalysisTask.h @@ -384,7 +384,7 @@ struct AnalysisDataProcessorBuilder { return true; }, task); - + overwriteInternalIndices(associatedTables, associatedTables); if constexpr (soa::is_soa_iterator_v>) { auto slicer = GroupSlicer(groupingTable, associatedTables, slices); for (auto& slice : slicer) { @@ -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>::bindExternalIndices(x, &groupingTable); diff --git a/Framework/Core/include/Framework/GroupSlicer.h b/Framework/Core/include/Framework/GroupSlicer.h index 5fd48ffe3ab75..2f94f6e7623a0 100644 --- a/Framework/Core/include/Framework/GroupSlicer.h +++ b/Framework/Core/include/Framework/GroupSlicer.h @@ -194,10 +194,9 @@ struct GroupSlicer { return typedTable; } else { - auto groupedElementsTable = originalTable.asArrowTable()->Slice(offset, count); - std::decay_t typedTable{{groupedElementsTable}, offset}; - typedTable.bindInternalIndicesTo(&originalTable); - return typedTable; + auto groupedElementsTable = originalTable.rawSlice(offset, offset + count - 1); + groupedElementsTable.bindInternalIndicesTo(&originalTable); + return groupedElementsTable; } } else { // generic split