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 
19 
25 namespace CUDF_EXPORT cudf {
40  public:
46  dictionary_column_view(column_view const& dictionary_column);
49  ~dictionary_column_view() override = default;
50 
57 
64 
66  static constexpr size_type indices_column_index{0};
68  static constexpr size_type keys_column_index{1};
69 
71  using column_view::is_empty;
73  using column_view::null_mask;
74  using column_view::offset;
75  using column_view::size;
76 
82  [[nodiscard]] column_view parent() const noexcept;
83 
89  [[nodiscard]] column_view indices() const noexcept;
90 
97  [[nodiscard]] column_view get_indices_annotated() const noexcept;
98 
104  [[nodiscard]] column_view keys() const noexcept;
105 
111  [[nodiscard]] data_type keys_type() const noexcept;
112 
118  [[nodiscard]] size_type keys_size() const noexcept;
119 }; // end of group
121 
123 namespace dictionary { // defined here for doxygen output
124 }
125 
126 } // 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.
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.