dictionary_column_view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <cudf/column/column.hpp>
20 
26 namespace CUDF_EXPORT cudf {
41  public:
47  dictionary_column_view(column_view const& dictionary_column);
50  ~dictionary_column_view() = default;
51 
58 
65 
67  static constexpr size_type indices_column_index{0};
69  static constexpr size_type keys_column_index{1};
70 
72  using column_view::is_empty;
74  using column_view::null_mask;
75  using column_view::offset;
76  using column_view::size;
77 
83  [[nodiscard]] column_view parent() const noexcept;
84 
90  [[nodiscard]] column_view indices() const noexcept;
91 
98  [[nodiscard]] column_view get_indices_annotated() const noexcept;
99 
105  [[nodiscard]] column_view keys() const noexcept;
106 
112  [[nodiscard]] data_type keys_type() const noexcept;
113 
119  [[nodiscard]] size_type keys_size() const noexcept;
120 }; // end of group
122 
124 namespace dictionary { // defined here for doxygen output
125 }
126 
127 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Indicator for the logical data type of an element in a column.
Definition: types.hpp:243
A wrapper class for operations on a dictionary column.
dictionary_column_view(dictionary_column_view &&)=default
Move constructor.
dictionary_column_view & operator=(dictionary_column_view const &)=default
Move assignment operator.
dictionary_column_view(dictionary_column_view const &)=default
Copy constructor.
dictionary_column_view(column_view const &dictionary_column)
Construct a new dictionary column view object from a column view.
dictionary_column_view & operator=(dictionary_column_view &&)=default
Copy assignment operator.
column_view parent() const noexcept
Returns the parent column.
Class definition for cudf::column.
column view class definitions
cudf::size_type null_count(bitmask_type const *bitmask, size_type start, size_type stop, rmm::cuda_stream_view stream=cudf::get_default_stream())
Given a validity bitmask, counts the number of null elements (unset bits) in the range [start,...
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:95
cuDF interfaces
Definition: aggregation.hpp:35
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.