Skip to content

Commit 3dd2eb9

Browse files
aalkinktf
authored andcommitted
DPL Analysis: fix for filtered grouping
1 parent 031a3cd commit 3dd2eb9

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎Framework/Core/include/Framework/ASoA.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1706,7 +1706,7 @@ class Filtered<Filtered<T>> : public FilteredPolicy<typename T::table_t>
17061706
};
17071707

17081708
template <typename T>
1709-
using is_soa_filtered_t = typename framework::is_specialization<T, soa::Filtered>;
1709+
using is_soa_filtered_t = typename framework::is_base_of_template<soa::FilteredPolicy, T>;
17101710

17111711
template <typename T>
17121712
auto filter(T&& t, framework::expressions::Filter const& expr)

‎Framework/Core/include/Framework/AnalysisTask.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,9 +890,11 @@ struct AnalysisDataProcessorBuilder {
890890
{
891891
constexpr auto index = framework::has_type_at<A1>(associated_pack_t{});
892892
if (hasIndexTo<G>(typename std::decay_t<A1>::persistent_columns_t{})) {
893-
auto pos = position;
893+
uint64_t pos;
894894
if constexpr (soa::is_soa_filtered_t<std::decay_t<G>>::value) {
895-
pos = groupSelection[position];
895+
pos = (*groupSelection)[position];
896+
} else {
897+
pos = position;
896898
}
897899
if constexpr (soa::is_soa_filtered_t<std::decay_t<A1>>::value) {
898900
auto groupedElementsTable = arrow::util::get<std::shared_ptr<arrow::Table>>(((groups[index])[pos]).value);
@@ -923,7 +925,7 @@ struct AnalysisDataProcessorBuilder {
923925
std::tuple<A...>* mAt;
924926
typename grouping_t::iterator mGroupingElement;
925927
uint64_t position = 0;
926-
soa::SelectionVector* groupSelection = nullptr;
928+
soa::SelectionVector const* groupSelection = nullptr;
927929

928930
std::array<std::vector<arrow::Datum>, sizeof...(A)> groups;
929931
std::array<std::vector<uint64_t>, sizeof...(A)> offsets;

0 commit comments

Comments
 (0)