Skip to content

Commit

Permalink
Initial changes (10.2 not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
codereport committed Jan 28, 2021
1 parent 27893db commit 34f02c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/include/cudf/detail/aggregation/aggregation.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ struct elementwise_aggregator {
column_device_view source,
size_type source_index) const noexcept
{
update_target_element<Source, k, target_has_nulls, source_has_nulls>{}(
using DeviceType = device_storage_type_t<Source>;
update_target_element<DeviceType, k, target_has_nulls, source_has_nulls>{}(
target, target_index, source, source_index);
}
};
Expand Down
17 changes: 17 additions & 0 deletions cpp/tests/groupby/group_count_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ TYPED_TEST(FixedPointTestBothReps, GroupBySumProductMinMaxDecimalAsValue)
auto const expect_vals_min = fp_wrapper{{0, 1, 2}, scale};
auto const expect_vals_max = fp_wrapper{{6, 9, 8}, scale};

// group_by sort tests

auto agg1 = cudf::make_sum_aggregation();
test_single_agg(
keys, vals, expect_keys, expect_vals_sum, std::move(agg1), force_use_sort_impl::YES);
Expand All @@ -237,6 +239,21 @@ TYPED_TEST(FixedPointTestBothReps, GroupBySumProductMinMaxDecimalAsValue)
EXPECT_THROW(
test_single_agg(keys, vals, expect_keys, {}, std::move(agg4), force_use_sort_impl::YES),
cudf::logic_error);

// group_by hash tests

auto agg5 = cudf::make_sum_aggregation();
test_single_agg(keys, vals, expect_keys, expect_vals_sum, std::move(agg5));

// auto agg6 = cudf::make_min_aggregation();
// test_single_agg(keys, vals, expect_keys, expect_vals_min, std::move(agg6));

// auto agg7 = cudf::make_max_aggregation();
// test_single_agg(keys, vals, expect_keys, expect_vals_max, std::move(agg7));

// auto agg8 = cudf::make_product_aggregation();
// EXPECT_THROW(test_single_agg(keys, vals, expect_keys, {}, std::move(agg8)),
// cudf::logic_error);
}
}

Expand Down

0 comments on commit 34f02c2

Please sign in to comment.