From bbae90a9f84fecc70fc55383f9a853be8ce13005 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 17 May 2022 14:21:00 -0700 Subject: [PATCH] Rename get_sliced_child to sliced_child. --- cpp/include/cudf/detail/gather.cuh | 6 +++--- cpp/include/cudf/lists/lists_column_view.hpp | 6 +++--- .../cudf/structs/structs_column_view.hpp | 4 ++-- cpp/src/copying/concatenate.cu | 4 ++-- cpp/src/copying/contiguous_split.cu | 2 +- cpp/src/groupby/sort/group_merge_lists.cu | 4 ++-- cpp/src/groupby/sort/group_scan_util.cuh | 2 +- cpp/src/lists/apply_boolean_mask.cu | 4 ++-- .../combine/concatenate_list_elements.cu | 2 +- cpp/src/lists/copying/concatenate.cu | 4 ++-- cpp/src/lists/copying/gather.cu | 4 ++-- cpp/src/lists/copying/segmented_gather.cu | 4 ++-- cpp/src/lists/drop_list_duplicates.cu | 11 +++++----- cpp/src/lists/explode.cu | 6 +++--- cpp/src/lists/lists_column_view.cu | 2 +- cpp/src/lists/segmented_sort.cu | 4 ++-- cpp/src/merge/merge.cu | 2 +- cpp/src/reductions/collect_ops.cu | 6 +++--- cpp/src/reductions/scan/scan_inclusive.cu | 4 ++-- cpp/src/reshape/interleave_columns.cu | 7 +++---- cpp/src/strings/combine/join_list_elements.cu | 4 ++-- cpp/src/structs/structs_column_view.cpp | 2 +- cpp/src/structs/utilities.cpp | 6 +++--- cpp/src/transform/row_bit_count.cu | 4 ++-- cpp/tests/utilities/column_utilities.cu | 20 +++++++++---------- java/src/main/native/src/ColumnViewJni.cpp | 2 +- java/src/main/native/src/map_lookup.cu | 4 ++-- 27 files changed, 64 insertions(+), 66 deletions(-) diff --git a/cpp/include/cudf/detail/gather.cuh b/cpp/include/cudf/detail/gather.cuh index 63a62beca58..cdb06dd9449 100644 --- a/cpp/include/cudf/detail/gather.cuh +++ b/cpp/include/cudf/detail/gather.cuh @@ -352,7 +352,7 @@ struct column_gatherer_impl { // the nesting case. if (list.child().type() == cudf::data_type{type_id::LIST}) { // gather children - auto child = lists::detail::gather_list_nested(list.get_sliced_child(stream), gd, stream, mr); + auto child = lists::detail::gather_list_nested(list.sliced_child(stream), gd, stream, mr); // return the final column return make_lists_column(gather_map_size, @@ -363,7 +363,7 @@ struct column_gatherer_impl { } // it's a leaf. do a regular gather - auto child = lists::detail::gather_list_leaf(list.get_sliced_child(stream), gd, stream, mr); + auto child = lists::detail::gather_list_leaf(list.sliced_child(stream), gd, stream, mr); // assemble final column return make_lists_column(gather_map_size, @@ -461,7 +461,7 @@ struct column_gatherer_impl { thrust::make_counting_iterator(column.num_children()), std::back_inserter(sliced_children), [structs_view = structs_column_view{column}](auto const idx) { - return structs_view.get_sliced_child(idx); + return structs_view.sliced_child(idx); }); std::vector> output_struct_members; diff --git a/cpp/include/cudf/lists/lists_column_view.hpp b/cpp/include/cudf/lists/lists_column_view.hpp index d09bc2c935f..e21d9260a1f 100644 --- a/cpp/include/cudf/lists/lists_column_view.hpp +++ b/cpp/include/cudf/lists/lists_column_view.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, NVIDIA CORPORATION. + * Copyright (c) 2020-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. @@ -85,11 +85,11 @@ class lists_column_view : private column_view { * Slice/split offset values are only stored at the root level of a list column. * So when doing computations on them, we need to apply that offset to * the child columns when recursing. Most functions operating in a recursive manner - * on lists columns should be using `get_sliced_child()` instead of `child()`. + * on lists columns should be using `sliced_child()` instead of `child()`. * * @throw cudf::logic error if this is an empty column */ - [[nodiscard]] column_view get_sliced_child(rmm::cuda_stream_view stream) const; + [[nodiscard]] column_view sliced_child(rmm::cuda_stream_view stream) const; /** * @brief Return first offset (accounting for column offset) diff --git a/cpp/include/cudf/structs/structs_column_view.hpp b/cpp/include/cudf/structs/structs_column_view.hpp index ca866d8555e..772bc36e8eb 100644 --- a/cpp/include/cudf/structs/structs_column_view.hpp +++ b/cpp/include/cudf/structs/structs_column_view.hpp @@ -61,11 +61,11 @@ class structs_column_view : public column_view { * Slice/split offset values are only stored at the root level of a struct column. * So when doing computations on them, we need to apply that offset to * the child columns when recursing. Most functions operating in a recursive manner - * on struct columns should be using `get_sliced_child()` instead of `child()`. + * on struct columns should be using `sliced_child()` instead of `child()`. * * @throw cudf::logic error if this is an empty column */ - [[nodiscard]] column_view get_sliced_child(int index) const; + [[nodiscard]] column_view sliced_child(int index) const; }; // class structs_column_view; /** @} */ // end of group } // namespace cudf diff --git a/cpp/src/copying/concatenate.cu b/cpp/src/copying/concatenate.cu index 8e9f505307c..1303b6f43c7 100644 --- a/cpp/src/copying/concatenate.cu +++ b/cpp/src/copying/concatenate.cu @@ -413,7 +413,7 @@ void traverse_children::operator()(host_span(host_span std::transform( cols.begin(), cols.end(), std::back_inserter(nth_children), [stream](column_view const& col) { lists_column_view lcv(col); - return lcv.get_sliced_child(stream); + return lcv.sliced_child(stream); }); bounds_and_type_check(nth_children, stream); } diff --git a/cpp/src/copying/contiguous_split.cu b/cpp/src/copying/contiguous_split.cu index 35e7eba974f..9d675cd8e9b 100644 --- a/cpp/src/copying/contiguous_split.cu +++ b/cpp/src/copying/contiguous_split.cu @@ -618,7 +618,7 @@ std::pair buf_info_functor::operator() group_merge_lists(column_view const& values, // The child column of the output lists column is just copied from the input column. auto child_column = - std::make_unique(lists_column_view(values).get_sliced_child(stream), stream, mr); + std::make_unique(lists_column_view(values).sliced_child(stream), stream, mr); return make_lists_column(num_groups, std::move(offsets_column), diff --git a/cpp/src/groupby/sort/group_scan_util.cuh b/cpp/src/groupby/sort/group_scan_util.cuh index c90ee6dda2d..cade06303df 100644 --- a/cpp/src/groupby/sort/group_scan_util.cuh +++ b/cpp/src/groupby/sort/group_scan_util.cuh @@ -208,7 +208,7 @@ struct group_scan_functor apply_boolean_mask(lists_column_view const& input, auto constexpr offset_data_type = data_type{type_id::INT32}; - auto const boolean_mask_sliced_child = boolean_mask.get_sliced_child(stream); + auto const boolean_mask_sliced_child = boolean_mask.sliced_child(stream); auto const make_filtered_child = [&] { auto filtered = cudf::detail::apply_boolean_mask( - cudf::table_view{{input.get_sliced_child(stream)}}, boolean_mask_sliced_child, stream, mr) + cudf::table_view{{input.sliced_child(stream)}}, boolean_mask_sliced_child, stream, mr) ->release(); return std::move(filtered.front()); }; diff --git a/cpp/src/lists/combine/concatenate_list_elements.cu b/cpp/src/lists/combine/concatenate_list_elements.cu index f4d8e7678b1..944e3e19f88 100644 --- a/cpp/src/lists/combine/concatenate_list_elements.cu +++ b/cpp/src/lists/combine/concatenate_list_elements.cu @@ -75,7 +75,7 @@ std::unique_ptr concatenate_lists_ignore_null(column_view const& input, // The child column of the output lists column is just copied from the input column. auto out_entries = std::make_unique( - lists_column_view(lists_column_view(input).get_sliced_child(stream)).get_sliced_child(stream), + lists_column_view(lists_column_view(input).sliced_child(stream)).sliced_child(stream), stream, mr); diff --git a/cpp/src/lists/copying/concatenate.cu b/cpp/src/lists/copying/concatenate.cu index 22083f7ce99..67bbcc95058 100644 --- a/cpp/src/lists/copying/concatenate.cu +++ b/cpp/src/lists/copying/concatenate.cu @@ -78,7 +78,7 @@ std::unique_ptr merge_offsets(host_span columns d_merged_offsets.begin() + count, [local_shift] __device__(size_type offset) { return offset + local_shift; }); - shift += c.get_sliced_child(stream).size(); + shift += c.sliced_child(stream).size(); count += c.size(); } }); @@ -112,7 +112,7 @@ std::unique_ptr concatenate( [&total_list_count, &children, stream](lists_column_view const& l) { // count total # of lists total_list_count += l.size(); - children.push_back(l.get_sliced_child(stream)); + children.push_back(l.sliced_child(stream)); }); auto data = cudf::detail::concatenate(children, stream, mr); diff --git a/cpp/src/lists/copying/gather.cu b/cpp/src/lists/copying/gather.cu index ae9fab4dda2..593a430b981 100644 --- a/cpp/src/lists/copying/gather.cu +++ b/cpp/src/lists/copying/gather.cu @@ -173,7 +173,7 @@ std::unique_ptr gather_list_nested(cudf::lists_column_view const& list, // the nesting case. if (list.child().type() == cudf::data_type{type_id::LIST}) { // gather children. - auto child = gather_list_nested(list.get_sliced_child(stream), child_gd, stream, mr); + auto child = gather_list_nested(list.sliced_child(stream), child_gd, stream, mr); // return the nested column return make_lists_column(gather_map_size, @@ -186,7 +186,7 @@ std::unique_ptr gather_list_nested(cudf::lists_column_view const& list, } // it's a leaf. do a regular gather - auto child = gather_list_leaf(list.get_sliced_child(stream), child_gd, stream, mr); + auto child = gather_list_leaf(list.sliced_child(stream), child_gd, stream, mr); // assemble final column return make_lists_column(gather_map_size, diff --git a/cpp/src/lists/copying/segmented_gather.cu b/cpp/src/lists/copying/segmented_gather.cu index 45a1b2c50fe..128ea18d165 100644 --- a/cpp/src/lists/copying/segmented_gather.cu +++ b/cpp/src/lists/copying/segmented_gather.cu @@ -41,7 +41,7 @@ std::unique_ptr segmented_gather(lists_column_view const& value_column, CUDF_EXPECTS(value_column.size() == gather_map.size(), "Gather map and list column should be same size"); - auto const gather_map_sliced_child = gather_map.get_sliced_child(stream); + auto const gather_map_sliced_child = gather_map.sliced_child(stream); auto const gather_map_size = gather_map_sliced_child.size(); auto const gather_index_begin = gather_map.offsets_begin() + 1; auto const gather_index_end = gather_map.offsets_end(); @@ -80,7 +80,7 @@ std::unique_ptr segmented_gather(lists_column_view const& value_column, auto child_gather_index_begin = cudf::detail::make_counting_transform_iterator(0, transformer); // Call gather on child of value_column - auto child_table = cudf::detail::gather(table_view({value_column.get_sliced_child(stream)}), + auto child_table = cudf::detail::gather(table_view({value_column.sliced_child(stream)}), child_gather_index_begin, child_gather_index_begin + gather_map_size, bounds_policy, diff --git a/cpp/src/lists/drop_list_duplicates.cu b/cpp/src/lists/drop_list_duplicates.cu index 8a4704ad13b..c2987e51619 100644 --- a/cpp/src/lists/drop_list_duplicates.cu +++ b/cpp/src/lists/drop_list_duplicates.cu @@ -95,7 +95,7 @@ struct has_negative_nans_dispatch { return std::any_of(thrust::make_counting_iterator(0), thrust::make_counting_iterator(input.num_children()), [structs_view = structs_column_view{input}, stream](auto const child_idx) { - auto const col = structs_view.get_sliced_child(child_idx); + auto const col = structs_view.sliced_child(child_idx); return type_dispatcher( col.type(), has_negative_nans_dispatch{}, col, stream); }); @@ -139,7 +139,7 @@ struct replace_negative_nans_dispatch { thrust::make_counting_iterator(input.num_children()), std::back_inserter(output_struct_members), [structs_view = structs_column_view{input}, stream](auto const child_idx) { - auto const col = structs_view.get_sliced_child(child_idx); + auto const col = structs_view.sliced_child(child_idx); return type_dispatcher( col.type(), replace_negative_nans_dispatch{}, col, stream); }); @@ -568,7 +568,7 @@ std::pair, std::unique_ptr> drop_list_duplicates } // The child column containing list entries. - auto const keys_child = keys.get_sliced_child(stream); + auto const keys_child = keys.sliced_child(stream); // Generate a mapping from list entries to their 1-based list indices for the keys column. auto const entries_list_indices = @@ -603,9 +603,8 @@ std::pair, std::unique_ptr> drop_list_duplicates } }(); - auto const sorting_table = values - ? table_view{{keys_child, values.value().get_sliced_child(stream)}} - : table_view{{keys_child}}; + auto const sorting_table = values ? table_view{{keys_child, values.value().sliced_child(stream)}} + : table_view{{keys_child}}; auto const sorted_table = cudf::detail::gather(sorting_table, sorted_order->view(), out_of_bounds_policy::DONT_CHECK, diff --git a/cpp/src/lists/explode.cu b/cpp/src/lists/explode.cu index 19242764277..bfb29c61fd5 100644 --- a/cpp/src/lists/explode.cu +++ b/cpp/src/lists/explode.cu @@ -114,7 +114,7 @@ std::unique_ptr explode(table_view const& input_table, rmm::mr::device_memory_resource* mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; - auto sliced_child = explode_col.get_sliced_child(stream); + auto sliced_child = explode_col.sliced_child(stream); rmm::device_uvector gather_map(sliced_child.size(), stream); // Sliced columns may require rebasing of the offsets. @@ -150,7 +150,7 @@ std::unique_ptr
explode_position(table_view const& input_table, rmm::mr::device_memory_resource* mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; - auto sliced_child = explode_col.get_sliced_child(stream); + auto sliced_child = explode_col.sliced_child(stream); rmm::device_uvector gather_map(sliced_child.size(), stream); // Sliced columns may require rebasing of the offsets. @@ -198,7 +198,7 @@ std::unique_ptr
explode_outer(table_view const& input_table, rmm::mr::device_memory_resource* mr) { lists_column_view explode_col{input_table.column(explode_column_idx)}; - auto sliced_child = explode_col.get_sliced_child(stream); + auto sliced_child = explode_col.sliced_child(stream); auto counting_iter = thrust::make_counting_iterator(0); auto offsets = explode_col.offsets_begin(); diff --git a/cpp/src/lists/lists_column_view.cu b/cpp/src/lists/lists_column_view.cu index 6e2ed0252bc..a00b0c43bb5 100644 --- a/cpp/src/lists/lists_column_view.cu +++ b/cpp/src/lists/lists_column_view.cu @@ -43,7 +43,7 @@ column_view lists_column_view::child() const return column_view::child(child_column_index); } -column_view lists_column_view::get_sliced_child(rmm::cuda_stream_view stream) const +column_view lists_column_view::sliced_child(rmm::cuda_stream_view stream) const { // if I have a positive offset, I need to slice my child if (offset() > 0) { diff --git a/cpp/src/lists/segmented_sort.cu b/cpp/src/lists/segmented_sort.cu index 0d742211f98..52b18cc7c8b 100644 --- a/cpp/src/lists/segmented_sort.cu +++ b/cpp/src/lists/segmented_sort.cu @@ -254,7 +254,7 @@ std::unique_ptr sort_lists(lists_column_view const& input, // for non-numeric columns, calls segmented_sort_by_key. auto output_child = type_dispatcher(input.child().type(), SegmentedSortColumn{}, - input.get_sliced_child(stream), + input.sliced_child(stream), output_offset->view(), column_order, null_precedence, @@ -291,7 +291,7 @@ std::unique_ptr stable_sort_lists(lists_column_view const& input, return offset_index - *first; }); - auto const child = input.get_sliced_child(stream); + auto const child = input.sliced_child(stream); auto const sorted_child_table = stable_segmented_sort_by_key(table_view{{child}}, table_view{{child}}, output_offset->view(), diff --git a/cpp/src/merge/merge.cu b/cpp/src/merge/merge.cu index 9c94a6220d6..3b90bffc387 100644 --- a/cpp/src/merge/merge.cu +++ b/cpp/src/merge/merge.cu @@ -362,7 +362,7 @@ std::unique_ptr column_merger::operator()( auto it = cudf::detail::make_counting_transform_iterator( 0, [&, merger = column_merger{row_order_}](size_type i) { return cudf::type_dispatcher( - lhs.child(i).type(), merger, lhs.get_sliced_child(i), rhs.get_sliced_child(i), stream, mr); + lhs.child(i).type(), merger, lhs.sliced_child(i), rhs.sliced_child(i), stream, mr); }); auto merged_children = std::vector>(it, it + lhs.num_children()); diff --git a/cpp/src/reductions/collect_ops.cu b/cpp/src/reductions/collect_ops.cu index c9bd06a1171..09b44b9ae13 100644 --- a/cpp/src/reductions/collect_ops.cu +++ b/cpp/src/reductions/collect_ops.cu @@ -36,7 +36,7 @@ std::unique_ptr drop_duplicates(list_scalar const& scalar, auto list_wrapper = lists::detail::make_lists_column_from_scalar(scalar, 1, stream, mr); auto lcw = lists_column_view(list_wrapper->view()); auto no_dup_wrapper = lists::drop_list_duplicates(lcw, nulls_equal, nans_equal, mr); - auto no_dup = lists_column_view(no_dup_wrapper->view()).get_sliced_child(stream); + auto no_dup = lists_column_view(no_dup_wrapper->view()).sliced_child(stream); return make_list_scalar(no_dup, stream, mr); } @@ -61,7 +61,7 @@ std::unique_ptr merge_lists(lists_column_view const& col, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) { - auto flatten_col = col.get_sliced_child(stream); + auto flatten_col = col.sliced_child(stream); return make_list_scalar(flatten_col, stream, mr); } @@ -83,7 +83,7 @@ std::unique_ptr merge_sets(lists_column_view const& col, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) { - auto flatten_col = col.get_sliced_child(stream); + auto flatten_col = col.sliced_child(stream); auto scalar = std::make_unique(flatten_col, true, stream, mr); return drop_duplicates(*scalar, nulls_equal, nans_equal, stream, mr); } diff --git a/cpp/src/reductions/scan/scan_inclusive.cu b/cpp/src/reductions/scan/scan_inclusive.cu index df5b5008e5b..db23ad565da 100644 --- a/cpp/src/reductions/scan/scan_inclusive.cu +++ b/cpp/src/reductions/scan/scan_inclusive.cu @@ -169,12 +169,12 @@ struct scan_functor { gather_map.begin(), binop_generator.binop()); - // Gather the children columns of the input column. Must use `get_sliced_child` to properly + // Gather the children columns of the input column. Must use `sliced_child` to properly // handle input in case it is a sliced view. auto const input_children = [&] { auto const it = cudf::detail::make_counting_transform_iterator( 0, [structs_view = structs_column_view{input}, stream](auto const child_idx) { - return structs_view.get_sliced_child(child_idx); + return structs_view.sliced_child(child_idx); }); return std::vector(it, it + input.num_children()); }(); diff --git a/cpp/src/reshape/interleave_columns.cu b/cpp/src/reshape/interleave_columns.cu index d9e858e8e40..35daea4fcb7 100644 --- a/cpp/src/reshape/interleave_columns.cu +++ b/cpp/src/reshape/interleave_columns.cu @@ -91,10 +91,9 @@ struct interleave_columns_impl> output_struct_members; for (size_type child_idx = 0; child_idx < num_children; ++child_idx) { // Collect children columns from the input structs columns at index `child_idx`. - auto const child_iter = - thrust::make_transform_iterator(structs_columns.begin(), [child_idx](auto const& col) { - return structs_column_view(col).get_sliced_child(child_idx); - }); + auto const child_iter = thrust::make_transform_iterator( + structs_columns.begin(), + [child_idx](auto const& col) { return structs_column_view(col).sliced_child(child_idx); }); auto children = std::vector(child_iter, child_iter + num_columns); auto const child_type = children.front().type(); diff --git a/cpp/src/strings/combine/join_list_elements.cu b/cpp/src/strings/combine/join_list_elements.cu index c4127ed8409..a47a13e3be4 100644 --- a/cpp/src/strings/combine/join_list_elements.cu +++ b/cpp/src/strings/combine/join_list_elements.cu @@ -186,7 +186,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string if (num_rows == 0) { return make_empty_column(type_id::STRING); } // Accessing the child strings column of the lists column must be done by calling `child()` on the - // lists column, not `get_sliced_child()`. This is because calling to `offsets_begin()` on the + // lists column, not `sliced_child()`. This is because calling to `offsets_begin()` on the // lists column returns a pointer to the offsets of the original lists column, which may not start // from `0`. auto const strings_col = strings_column_view(lists_strings_column.child()); @@ -260,7 +260,7 @@ std::unique_ptr join_list_elements(lists_column_view const& lists_string if (num_rows == 0) { return make_empty_column(type_id::STRING); } // Accessing the child strings column of the lists column must be done by calling `child()` on the - // lists column, not `get_sliced_child()`. This is because calling to `offsets_begin()` on the + // lists column, not `sliced_child()`. This is because calling to `offsets_begin()` on the // lists column returns a pointer to the offsets of the original lists column, which may not start // from `0`. auto const strings_col = strings_column_view(lists_strings_column.child()); diff --git a/cpp/src/structs/structs_column_view.cpp b/cpp/src/structs/structs_column_view.cpp index 7d8c8837d2d..4621b50ef6f 100644 --- a/cpp/src/structs/structs_column_view.cpp +++ b/cpp/src/structs/structs_column_view.cpp @@ -27,7 +27,7 @@ structs_column_view::structs_column_view(column_view const& rhs) : column_view{r column_view structs_column_view::parent() const { return *this; } -column_view structs_column_view::get_sliced_child(int index) const +column_view structs_column_view::sliced_child(int index) const { std::vector children; children.reserve(child(index).num_children()); diff --git a/cpp/src/structs/utilities.cpp b/cpp/src/structs/utilities.cpp index 13ba5e8280b..03ab7b27342 100644 --- a/cpp/src/structs/utilities.cpp +++ b/cpp/src/structs/utilities.cpp @@ -62,7 +62,7 @@ std::vector> extract_ordered_struct_children( "Mismatch in number of children during struct concatenate"); CUDF_EXPECTS(struct_cols[0].child(child_index).type() == scv.child(child_index).type(), "Mismatch in child types during struct concatenate"); - children.push_back(scv.get_sliced_child(child_index)); + children.push_back(scv.sliced_child(child_index)); } result.push_back(std::move(children)); @@ -157,7 +157,7 @@ struct table_flattener { if (not null_precedence.empty()) { flat_null_precedence.push_back(col_null_order); } } for (decltype(col.num_children()) i = 0; i < col.num_children(); ++i) { - auto const& child = col.get_sliced_child(i); + auto const& child = col.sliced_child(i); if (child.type().id() == type_id::STRUCT) { flatten_struct_column(structs_column_view{child}, col_order, col_null_order); } else { @@ -365,7 +365,7 @@ std::tuple> superimpose_paren // Function to rewrite child null mask. auto rewrite_child_mask = [&](auto const& child_idx) { - auto child = structs_column.get_sliced_child(child_idx); + auto child = structs_column.sliced_child(child_idx); // If struct is not nullable, child null mask is retained. NOOP. if (not structs_column.nullable()) { return child; } diff --git a/cpp/src/transform/row_bit_count.cu b/cpp/src/transform/row_bit_count.cu index 744cec90fd9..daf10d1cbf6 100644 --- a/cpp/src/transform/row_bit_count.cu +++ b/cpp/src/transform/row_bit_count.cu @@ -221,7 +221,7 @@ struct flatten_functor { lists_column_view lcv(col); auto iter = cudf::detail::make_counting_transform_iterator( - 0, [col = lcv.get_sliced_child(stream)](auto) { return col; }); + 0, [col = lcv.sliced_child(stream)](auto) { return col; }); h_info.complex_type_count++; flatten_hierarchy( @@ -246,7 +246,7 @@ struct flatten_functor { structs_column_view scv(col); auto iter = cudf::detail::make_counting_transform_iterator( - 0, [&scv](auto i) { return scv.get_sliced_child(i); }); + 0, [&scv](auto i) { return scv.sliced_child(i); }); flatten_hierarchy(iter, iter + scv.num_children(), out, diff --git a/cpp/tests/utilities/column_utilities.cu b/cpp/tests/utilities/column_utilities.cu index 015178f8c7c..df618ec206d 100644 --- a/cpp/tests/utilities/column_utilities.cu +++ b/cpp/tests/utilities/column_utilities.cu @@ -280,12 +280,12 @@ struct column_property_comparator { cudf::lists_column_view rhs_l(rhs); // recurse - auto lhs_child = lhs_l.get_sliced_child(rmm::cuda_stream_default); + auto lhs_child = lhs_l.sliced_child(rmm::cuda_stream_default); // note: if a column is all nulls or otherwise empty, no indices are generated and no recursion // happens auto lhs_child_indices = generate_child_row_indices(lhs_l, lhs_row_indices); if (lhs_child_indices->size() > 0) { - auto rhs_child = rhs_l.get_sliced_child(rmm::cuda_stream_default); + auto rhs_child = rhs_l.sliced_child(rmm::cuda_stream_default); auto rhs_child_indices = generate_child_row_indices(rhs_l, rhs_row_indices); return cudf::type_dispatcher(lhs_child.type(), column_property_comparator{}, @@ -311,8 +311,8 @@ struct column_property_comparator { structs_column_view r_scv(rhs); for (size_type i = 0; i < lhs.num_children(); i++) { - column_view lhs_child = l_scv.get_sliced_child(i); - column_view rhs_child = r_scv.get_sliced_child(i); + column_view lhs_child = l_scv.sliced_child(i); + column_view rhs_child = r_scv.sliced_child(i); if (!cudf::type_dispatcher(lhs_child.type(), column_property_comparator{}, lhs_child, @@ -648,12 +648,12 @@ struct column_comparator_impl { } // recurse. - auto lhs_child = lhs_l.get_sliced_child(rmm::cuda_stream_default); + auto lhs_child = lhs_l.sliced_child(rmm::cuda_stream_default); // note: if a column is all nulls or otherwise empty, no indices are generated and no recursion // happens auto lhs_child_indices = generate_child_row_indices(lhs_l, lhs_row_indices); if (lhs_child_indices->size() > 0) { - auto rhs_child = rhs_l.get_sliced_child(rmm::cuda_stream_default); + auto rhs_child = rhs_l.sliced_child(rmm::cuda_stream_default); auto rhs_child_indices = generate_child_row_indices(rhs_l, rhs_row_indices); return cudf::type_dispatcher(lhs_child.type(), column_comparator{}, @@ -684,8 +684,8 @@ struct column_comparator_impl { structs_column_view r_scv(rhs); for (size_type i = 0; i < lhs.num_children(); i++) { - column_view lhs_child = l_scv.get_sliced_child(i); - column_view rhs_child = r_scv.get_sliced_child(i); + column_view lhs_child = l_scv.sliced_child(i); + column_view rhs_child = r_scv.sliced_child(i); if (!cudf::type_dispatcher(lhs_child.type(), column_comparator{}, lhs_child, @@ -1070,7 +1070,7 @@ struct column_view_printer { lists_column_view lcv(col); // propagate slicing to the child if necessary - column_view child = lcv.get_sliced_child(rmm::cuda_stream_default); + column_view child = lcv.sliced_child(rmm::cuda_stream_default); bool const is_sliced = lcv.offset() > 0 || child.offset() > 0; std::string tmp = @@ -1113,7 +1113,7 @@ struct column_view_printer { iter + view.num_children(), std::ostream_iterator(out_stream, "\n"), [&](size_type index) { - auto child = view.get_sliced_child(index); + auto child = view.sliced_child(index); // non-nested types don't typically display their null masks, so do it here for convenience. return (!is_nested(child.type()) && child.nullable() diff --git a/java/src/main/native/src/ColumnViewJni.cpp b/java/src/main/native/src/ColumnViewJni.cpp index 664f4a5561d..c0b9e20b4fe 100644 --- a/java/src/main/native/src/ColumnViewJni.cpp +++ b/java/src/main/native/src/ColumnViewJni.cpp @@ -480,7 +480,7 @@ JNIEXPORT jlong JNICALL Java_ai_rapids_cudf_ColumnView_dropListDuplicatesWithKey // Extract list offsets and a column of struct from the input lists column. auto const lists_keys_vals = cudf::lists_column_view(*input_cv); - auto const keys_vals = lists_keys_vals.get_sliced_child(rmm::cuda_stream_default); + auto const keys_vals = lists_keys_vals.sliced_child(rmm::cuda_stream_default); CUDF_EXPECTS(keys_vals.type().id() == cudf::type_id::STRUCT, "Input column has child that is not a structs column."); CUDF_EXPECTS(keys_vals.num_children() == 2, diff --git a/java/src/main/native/src/map_lookup.cu b/java/src/main/native/src/map_lookup.cu index 13d1a5a94a9..a8a072ac1d0 100644 --- a/java/src/main/native/src/map_lookup.cu +++ b/java/src/main/native/src/map_lookup.cu @@ -135,7 +135,7 @@ void map_input_check(column_view const &map_column, rmm::cuda_stream_view stream CUDF_EXPECTS(map_column.type().id() == type_id::LIST, "Expected LIST>."); lists_column_view lcv{map_column}; - column_view structs_column = lcv.get_sliced_child(stream); + column_view structs_column = lcv.sliced_child(stream); CUDF_EXPECTS(structs_column.type().id() == type_id::STRUCT, "Expected LIST>."); @@ -188,7 +188,7 @@ std::unique_ptr map_lookup(column_view const &map_column, string_scalar } lists_column_view lcv{map_column}; - column_view structs_column = lcv.get_sliced_child(stream); + column_view structs_column = lcv.sliced_child(stream); // Two-pass plan: construct gather map, and then gather() on structs_column.child(1). Plan A. // (Can do in one pass perhaps, but that's Plan B.)