Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List lexicographic comparator #11129

Merged
merged 91 commits into from
Sep 12, 2022
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
933c974
First commit
devavret Aug 26, 2021
a1636e5
testing and profiling deep single hierarchy struct
devavret Aug 27, 2021
d59f54c
Merge branch 'branch-22.02' into struct-row-comp
devavret Jan 12, 2022
765dd8d
Merge branch 'branch-22.02' into struct-row-comp
devavret Jan 12, 2022
3d21daf
Make the sandboxed test compile again
devavret Jan 14, 2022
9f32e6b
Update my row_comparator with nullate
devavret Jan 15, 2022
53d3c90
Merge branch 'branch-22.02' into struct-row-comp
devavret Jan 21, 2022
022e2a4
Basic verticalization utility and experimental namespace
devavret Jan 24, 2022
7fef643
clean up most of row operators that I didn't change.
devavret Jan 26, 2022
930d8de
Sliced column test
devavret Jan 27, 2022
0ecc4f8
column order and null precendence support
devavret Jan 28, 2022
ff36d2d
Manually managed stack
devavret Jan 28, 2022
cd0f938
New depth based method to avoid superimpose nulls
devavret Feb 2, 2022
7b8e060
Put sort2 impl in separate TU
devavret Feb 2, 2022
25eb237
Merge branch 'branch-22.04' into struct-row-comp
devavret Feb 2, 2022
d2937cf
Merge branch 'branch-22.04' into struct-row-comp
devavret Feb 10, 2022
d55c9c7
Move verticalization code to row_comparator.cpp
devavret Feb 15, 2022
3bd749e
Owning row lex operator
devavret Feb 22, 2022
613d664
merge fixes
devavret Feb 23, 2022
2ef3ac7
Move struct logic out of main row loop and into element_relational_co…
devavret Feb 24, 2022
5577431
pushing even more logic into element_relational_comparator
devavret Feb 24, 2022
f037bc0
More optimizations.
devavret Feb 24, 2022
8c54a85
review changes
devavret Feb 24, 2022
9d24a87
Checks to ensure tables can be compared
devavret Feb 24, 2022
a664c81
Super basic list lex working
devavret Mar 2, 2022
1ebd877
list test expansion and cleanups.
devavret Mar 2, 2022
3e6e9f4
Make struct comp work again
devavret Mar 2, 2022
facc031
List lex benchmark
devavret Mar 2, 2022
a19b2c3
Merge branch 'branch-22.08' into list-lex-comp
devavret Jun 7, 2022
11bcf16
Add back code from old lex comparator that had list flattening
devavret Jun 7, 2022
53f4418
Move list lex code to experimental header
devavret Jun 14, 2022
0e528f0
get list lex working on code ported to exp header
devavret Jun 14, 2022
f545af0
Add null handling
devavret Jun 15, 2022
a4190a0
handle empty lists
devavret Jun 16, 2022
9362b8d
Add sliced list test
devavret Jun 16, 2022
a7ec09b
Use progressive slicing to get leaf column
devavret Jun 16, 2022
d6ef822
Clean up old experiment files
devavret Jun 16, 2022
5f0d36e
Turn dremel data raw pointers to spans
devavret Jun 17, 2022
941b808
Replace bench with nvbench and fix destroyed dremel data issue
devavret Jun 20, 2022
16e11cb
Merge branch 'branch-22.08' into list-lex-comp
devavret Jun 22, 2022
2bd2b6b
More benchmark iterations
devavret Jun 22, 2022
4be403c
merge pointers to dremel data into a view class
devavret Jun 28, 2022
8cbd70c
Allow lhs and rhs dremel data
devavret Jun 29, 2022
4640383
Merge branch 'branch-22.08' into list-lex-comp
devavret Jul 15, 2022
3f43968
reduce test verbosity
devavret Jul 15, 2022
4b233dc
Remove debug prints
devavret Jul 18, 2022
6be6078
rename linked column header
devavret Jul 18, 2022
8e4c870
Move dremel specific code out into spearate files
devavret Jul 18, 2022
ee13936
pass _comparator to elem comt
devavret Jul 18, 2022
499a5bd
Remove lines that deal with dremel data as separate variables
devavret Jul 18, 2022
0c3c12e
remove requirement to pass d_nullability and allow dremel_device_view…
devavret Jul 19, 2022
b62d0a2
Let get_dremel_data work without nullability
devavret Jul 20, 2022
a180bcc
Merge remote-tracking branch 'origin/branch-22.08' into list-lex-comp
vyasr Jul 26, 2022
229ebe3
Update meta.yaml.
vyasr Jul 26, 2022
926e7ab
Consolidate and augment descriptions of Dremel encoding.
vyasr Jul 27, 2022
d1cea06
Fix style.
vyasr Jul 27, 2022
6030b7b
Remove unnecessary optionals around dremel_device_view.
vyasr Jul 27, 2022
fbb9dd3
Simplify list_lex_preprocess.
vyasr Jul 27, 2022
25c22f9
Add some extra comments and docstrings.
vyasr Jul 27, 2022
5305349
Add extensive comments explaining the list comparison algorithm.
vyasr Jul 27, 2022
9b5f8c1
Reorder declarations for improved readability and logical consistency.
vyasr Jul 27, 2022
b334d19
Address open PR comments.
vyasr Jul 27, 2022
1e31ac1
Enable previously disabled test.
vyasr Jul 27, 2022
7c77616
Clean up comment.
vyasr Jul 27, 2022
1f6b050
Address first round of PR comments.
vyasr Jul 28, 2022
c35a39a
Move dremel files to lists/detail.
vyasr Jul 28, 2022
b520e38
Fix header.
vyasr Jul 28, 2022
ff66bdb
Merge remote-tracking branch 'origin/branch-22.08' into list-lex-comp
vyasr Jul 29, 2022
5a637d4
Merge remote-tracking branch 'origin/branch-22.10' into list-lex-comp
vyasr Aug 3, 2022
e8ebcc4
Try separating out primitive comparison.
vyasr Aug 4, 2022
77c57bf
Revert "Try separating out primitive comparison."
vyasr Aug 4, 2022
46f234f
Address most simple review comments.
vyasr Aug 4, 2022
6d89799
Merge remote-tracking branch 'origin/branch-22.10' into list-lex-comp
vyasr Aug 4, 2022
6b4ce40
Merge remote-tracking branch 'origin/branch-22.10' into list-lex-comp
vyasr Aug 29, 2022
b32205d
Update benchmark for new data generation API.
vyasr Aug 30, 2022
d578c8b
Add method to check for nested columns in a table_view.
vyasr Aug 31, 2022
0671246
Template comparator on the presence of nested columns and propagate p…
vyasr Aug 31, 2022
8c0ae93
Only define the list/struct overloads in the specialization that coul…
vyasr Aug 31, 2022
d285df9
Move the specialization to a completely separate class.
vyasr Sep 1, 2022
31a9bfd
Revert "Move the specialization to a completely separate class."
vyasr Sep 1, 2022
36cc5f3
Fix typo.
vyasr Sep 1, 2022
8dd293a
Convert the Dremel members of the preprocessed_table to optionals.
vyasr Sep 1, 2022
7b0ae58
Propagate optionals down to the element comparator.
vyasr Sep 1, 2022
be3ab5e
Revert "Propagate optionals down to the element comparator."
vyasr Sep 2, 2022
4a735d3
Stop storing empty dremel views for non-list columns and use a thrust…
vyasr Sep 2, 2022
ab5a264
Some cleanup.
vyasr Sep 2, 2022
d58ad80
Remove unnecessary check.
vyasr Sep 2, 2022
1f6b7ab
Address PR comments.
vyasr Sep 7, 2022
a1a9655
Revert "Remove unnecessary check."
vyasr Sep 7, 2022
f5cee47
Address remaining TODOs.
vyasr Sep 8, 2022
f7b671a
Fix typo.
vyasr Sep 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ ConfigureNVBench(SEARCH_NVBENCH search/contains.cpp)
# ##################################################################################################
# * sort benchmark --------------------------------------------------------------------------------
ConfigureBench(SORT_BENCH sort/rank.cpp sort/sort.cpp sort/sort_strings.cpp)
ConfigureNVBench(SORT_NVBENCH sort/sort_structs.cpp)
ConfigureNVBench(SORT_NVBENCH sort/sort_lists.cpp sort/sort_structs.cpp)

# ##################################################################################################
# * quantiles benchmark
Expand Down
49 changes: 49 additions & 0 deletions cpp/benchmarks/sort/sort_lists.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <benchmarks/common/generate_input.hpp>
#include <benchmarks/fixture/rmm_pool_raii.hpp>

#include <cudf/detail/sorting.hpp>

#include <nvbench/nvbench.cuh>

void nvbench_sort_lists(nvbench::state& state)
{
cudf::rmm_pool_raii pool_raii;

const size_t size_bytes(state.get_int64("size_bytes"));
const cudf::size_type depth{static_cast<cudf::size_type>(state.get_int64("depth"))};
auto const null_frequency{state.get_float64("null_frequency")};

data_profile table_profile;
table_profile.set_distribution_params(cudf::type_id::LIST, distribution_id::UNIFORM, 0, 5);
table_profile.set_list_depth(depth);
table_profile.set_null_probability(null_frequency);
auto const table =
create_random_table({cudf::type_id::LIST}, table_size_bytes{size_bytes}, table_profile);

state.exec(nvbench::exec_tag::sync, [&](nvbench::launch& launch) {
rmm::cuda_stream_view stream_view{launch.get_stream()};
cudf::detail::sorted_order(*table, {}, {}, stream_view, rmm::mr::get_current_device_resource());
});
}

NVBENCH_BENCH(nvbench_sort_lists)
.set_name("sort_list")
.add_int64_power_of_two_axis("size_bytes", {10, 18, 24, 28})
.add_int64_axis("depth", {1, 4})
.add_float64_axis("null_frequency", {0, 0.2});
14 changes: 5 additions & 9 deletions cpp/include/cudf/lists/detail/dremel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,11 @@ namespace cudf::detail {
* @see the `dremel_data` struct for more info.
*/
struct dremel_device_view {
// TODO: These elements are default initializable to support default
// initialization of the object. This is currently exploited to create views
// that will never actually be used. We should consider whether this
// represents a serious issue that should be worked around more robustly.
size_type const* offsets{};
uint8_t const* rep_levels{};
uint8_t const* def_levels{};
size_type const leaf_data_size{};
uint8_t const max_def_level{};
size_type const* offsets;
uint8_t const* rep_levels;
uint8_t const* def_levels;
size_type const leaf_data_size;
uint8_t const max_def_level;
};

/**
Expand Down
293 changes: 256 additions & 37 deletions cpp/include/cudf/table/experimental/row_operators.cuh

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions cpp/include/cudf/table/table_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ class table_view_base {
*/
table_view_base& operator=(table_view_base&&) = default;
};

/**
* @brief The function to collect all nested columns in a given table.
vyasr marked this conversation as resolved.
Show resolved Hide resolved
*
* @param table The input table
* @return A vector containing all nested columns in the input table
vyasr marked this conversation as resolved.
Show resolved Hide resolved
*/
bool has_nested_columns(table_view const& table);
} // namespace detail

/**
Expand Down
14 changes: 11 additions & 3 deletions cpp/src/binaryop/compiled/struct_binary_ops.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,17 @@ void apply_struct_binary_op(mutable_column_view& out,
out.end<bool>(),
device_comparison_functor{optional_iter, is_lhs_scalar, is_rhs_scalar, device_comparator});
};
is_any_v<BinaryOperator, ops::LessEqual, ops::GreaterEqual>
? tabulate_device_operator(table_comparator.less_equivalent(comparator_nulls, comparator))
: tabulate_device_operator(table_comparator.less(comparator_nulls, comparator));
if (cudf::detail::has_nested_columns(tlhs) || cudf::detail::has_nested_columns(trhs)) {
is_any_v<BinaryOperator, ops::LessEqual, ops::GreaterEqual>
? tabulate_device_operator(
table_comparator.less_equivalent<true>(comparator_nulls, comparator))
: tabulate_device_operator(table_comparator.less<true>(comparator_nulls, comparator));
} else {
is_any_v<BinaryOperator, ops::LessEqual, ops::GreaterEqual>
? tabulate_device_operator(
table_comparator.less_equivalent<false>(comparator_nulls, comparator))
: tabulate_device_operator(table_comparator.less<false>(comparator_nulls, comparator));
}
}

template <typename PhysicalEqualityComparator =
Expand Down
55 changes: 38 additions & 17 deletions cpp/src/search/search_ordered.cu
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,49 @@ std::unique_ptr<column> search_ordered(table_view const& haystack,

auto const comparator = cudf::experimental::row::lexicographic::two_table_comparator(
matched_haystack, matched_needles, column_order, null_precedence, stream);
auto const has_nulls = has_nested_nulls(matched_haystack) or has_nested_nulls(matched_needles);
auto const d_comparator = comparator.less(nullate::DYNAMIC{has_nulls});
auto const has_nulls = has_nested_nulls(matched_haystack) or has_nested_nulls(matched_needles);

auto const haystack_it = cudf::experimental::row::lhs_iterator(0);
auto const needles_it = cudf::experimental::row::rhs_iterator(0);

if (find_first) {
thrust::lower_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
if (cudf::detail::has_nested_columns(haystack) || cudf::get_nested_columns(needles).size() > 0) {
vyasr marked this conversation as resolved.
Show resolved Hide resolved
auto const d_comparator = comparator.less<true>(nullate::DYNAMIC{has_nulls});
if (find_first) {
thrust::lower_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
} else {
thrust::upper_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
}
} else {
thrust::upper_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
auto const d_comparator = comparator.less<false>(nullate::DYNAMIC{has_nulls});
if (find_first) {
thrust::lower_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
} else {
thrust::upper_bound(rmm::exec_policy(stream),
haystack_it,
haystack_it + haystack.num_rows(),
needles_it,
needles_it + needles.num_rows(),
out_it,
d_comparator);
}
Comment on lines +77 to +113
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously I tried to use a lambda to simplify the code:

  auto const do_search = [find_first](auto&&... args) {
    if (find_first) {
      thrust::lower_bound(std::forward<decltype(args)>(args)...);
    } else {
      thrust::upper_bound(std::forward<decltype(args)>(args)...);
    }
  };
  do_search(rmm::exec_policy(stream),
            count_it,
            count_it + haystack.num_rows(),
            count_it,
            count_it + needles.num_rows(),
            out_it,
            comp);

Unfortunately using such variadic template causes false compiler warnings. I want to bring it back here in case you guys may have a new idea for improving this.

Copy link
Contributor

@ttnghia ttnghia Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if not, we can also reduce the code by half by writing a lambda for the block lower_bound/upper_bound and calling it twice.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #11667 for discussion on how we can improve this. The plan is to do that in a follow-up so that we don't hold up this feature any longer for refactoring-like tasks.

}
return result;
}
Expand Down
36 changes: 25 additions & 11 deletions cpp/src/sort/sort_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,32 @@ std::unique_ptr<column> sorted_order(table_view input,

auto comp =
experimental::row::lexicographic::self_comparator(input, column_order, null_precedence, stream);
auto comparator = comp.less(nullate::DYNAMIC{has_nested_nulls(input)});

if (stable) {
thrust::stable_sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
if (cudf::detail::has_nested_columns(input)) {
auto comparator = comp.less<true>(nullate::DYNAMIC{has_nested_nulls(input)});
if (stable) {
thrust::stable_sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
} else {
thrust::sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
}
} else {
thrust::sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
auto comparator = comp.less<false>(nullate::DYNAMIC{has_nested_nulls(input)});
if (stable) {
thrust::stable_sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
} else {
thrust::sort(rmm::exec_policy(stream),
mutable_indices_view.begin<size_type>(),
mutable_indices_view.end<size_type>(),
comparator);
}
vyasr marked this conversation as resolved.
Show resolved Hide resolved
}
// protection for temporary d_column_order and d_null_precedence
stream.synchronize();
Expand Down
56 changes: 48 additions & 8 deletions cpp/src/table/row_operators.cu
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,24 @@ auto decompose_structs(table_view table,
std::move(verticalized_col_depths));
}

/*
* This helper function generates dremel data for any list-type columns in a
* table. This data is necessary for lexicographic comparisons.
*/
auto list_lex_preprocess(table_view table, rmm::cuda_stream_view stream)
{
std::vector<detail::dremel_data> dremel_data;
std::vector<detail::dremel_device_view> dremel_device_views;
for (auto const& col : table) {
if (col.type().id() == type_id::LIST) {
dremel_data.push_back(detail::get_dremel_data(col, {}, false, stream));
dremel_device_views.push_back(dremel_data.back());
}
}
auto d_dremel_device_views = detail::make_device_uvector_sync(dremel_device_views, stream);
return std::make_tuple(std::move(dremel_data), std::move(d_dremel_device_views));
}

using column_checker_fn_t = std::function<void(column_view const&)>;

/**
Expand All @@ -264,18 +282,25 @@ using column_checker_fn_t = std::function<void(column_view const&)>;
*/
void check_lex_compatibility(table_view const& input)
{
// Basically check if there's any LIST hiding anywhere in the table
// Basically check if there's any LIST of STRUCT or STRUCT of LIST hiding anywhere in the table
devavret marked this conversation as resolved.
Show resolved Hide resolved
vyasr marked this conversation as resolved.
Show resolved Hide resolved
column_checker_fn_t check_column = [&](column_view const& c) {
CUDF_EXPECTS(c.type().id() != type_id::LIST,
"Cannot lexicographic compare a table with a LIST column");
if (c.type().id() == type_id::LIST) {
auto const& list_col = lists_column_view(c);
CUDF_EXPECTS(list_col.child().type().id() != type_id::STRUCT,
"Cannot lexicographic compare a table with a LIST of STRUCT column");
check_column(list_col.child());
} else if (c.type().id() == type_id::STRUCT) {
for (auto child = c.child_begin(); child < c.child_end(); ++child) {
CUDF_EXPECTS(child->type().id() != type_id::LIST,
"Cannot lexicographic compare a table with a STRUCT of LIST column");
check_column(*child);
}
}
vyasr marked this conversation as resolved.
Show resolved Hide resolved
if (not is_nested(c.type())) {
CUDF_EXPECTS(is_relationally_comparable(c.type()),
"Cannot lexicographic compare a table with a column of type " +
jit::get_type_name(c.type()));
vyasr marked this conversation as resolved.
Show resolved Hide resolved
}
for (auto child = c.child_begin(); child < c.child_end(); ++child) {
check_column(*child);
}
};
for (column_view const& c : input) {
check_column(c);
Expand Down Expand Up @@ -336,8 +361,23 @@ std::shared_ptr<preprocessed_table> preprocessed_table::create(
auto d_null_precedence = detail::make_device_uvector_async(new_null_precedence, stream);
auto d_depths = detail::make_device_uvector_async(verticalized_col_depths, stream);

return std::shared_ptr<preprocessed_table>(new preprocessed_table(
std::move(d_t), std::move(d_column_order), std::move(d_null_precedence), std::move(d_depths)));
if (detail::has_nested_columns(t)) > 0)
vyasr marked this conversation as resolved.
Show resolved Hide resolved
{
auto [dremel_data, d_dremel_device_view] = list_lex_preprocess(verticalized_lhs, stream);
return std::shared_ptr<preprocessed_table>(
new preprocessed_table(std::move(d_t),
std::move(d_column_order),
std::move(d_null_precedence),
std::move(d_depths),
std::move(dremel_data),
std::move(d_dremel_device_view)));
}
else {
return std::shared_ptr<preprocessed_table>(new preprocessed_table(std::move(d_t),
std::move(d_column_order),
std::move(d_null_precedence),
std::move(d_depths)));
}
}

two_table_comparator::two_table_comparator(table_view const& left,
Expand Down
6 changes: 6 additions & 0 deletions cpp/src/table/table_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,11 @@ template bool is_relationally_comparable<table_view>(table_view const& lhs, tabl
template bool is_relationally_comparable<mutable_table_view>(mutable_table_view const& lhs,
mutable_table_view const& rhs);

bool has_nested_columns(table_view const& table)
{
return std::any_of(
table.begin(), table.end(), [](column_view const& col) { return is_nested(col.type()); });
}

} // namespace detail
} // namespace cudf
25 changes: 19 additions & 6 deletions cpp/tests/rolling/collect_ops_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2275,10 +2275,23 @@ TEST_F(CollectSetTest, ListTypeRollingWindow)
auto const prev_column = fixed_width_column_wrapper<size_type>{1, 2, 2, 2, 2};
auto const foll_column = fixed_width_column_wrapper<size_type>{1, 1, 1, 1, 0};

EXPECT_THROW(rolling_collect_set(input_column,
prev_column,
foll_column,
1,
*make_collect_set_aggregation<rolling_aggregation>()),
cudf::logic_error);
auto const expected = [] {
auto data = fixed_width_column_wrapper<int32_t>{1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 4, 5,
6, 7, 8, 9, 6, 7, 8, 9, 10, 7, 8, 9, 10};
auto inner_offsets =
fixed_width_column_wrapper<int32_t>{0, 3, 5, 8, 10, 11, 13, 14, 17, 18, 21, 22, 25, 26};
auto outer_offsets = fixed_width_column_wrapper<size_type>{0, 2, 5, 8, 11, 13};

auto inner_list = cudf::make_lists_column(13, inner_offsets.release(), data.release(), 0, {});

return cudf::make_lists_column(5, outer_offsets.release(), std::move(inner_list), 0, {});
}();

auto const result = rolling_collect_set(input_column,
prev_column,
foll_column,
1,
*make_collect_set_aggregation<rolling_aggregation>());

CUDF_TEST_EXPECT_COLUMNS_EQUIVALENT(expected->view(), result->view());
}
Loading