50 template <
typename ColumnView>
52 static_assert(std::is_same_v<ColumnView, column_view> or
53 std::is_same_v<ColumnView, mutable_column_view>,
54 "table_view_base can only be instantiated with column_view or "
58 std::vector<ColumnView> _columns{};
62 using iterator = decltype(std::begin(_columns));
226 template <
typename InputIterator>
307 return std::any_of(view.
begin(), view.
end(), [](
auto const& col) { return col.nullable(); });
320 return std::any_of(view.
begin(), view.
end(), [](
auto const& col) { return col.has_nulls(); });
331 return std::any_of(input.
begin(), input.
end(), [](
auto const& col) {
332 return col.has_nulls() ||
333 std::any_of(col.child_begin(), col.child_end(), [](auto const& child_col) {
334 return has_nested_nulls(table_view{{child_col}});
348 return std::any_of(input.
begin(), input.
end(), [](
auto const& col) {
349 return col.nullable() ||
350 std::any_of(col.child_begin(), col.child_end(), [](auto const& child_col) {
351 return has_nested_nullable_columns(table_view{{child_col}});
395 std::vector<size_type>
const& map,
407 template <
typename TableView>
410 extern template bool is_relationally_comparable<table_view>(
table_view const& lhs,
412 extern template bool is_relationally_comparable<mutable_table_view>(
mutable_table_view const& lhs,
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Base class for a table of ColumnViews.
table_view_base(std::vector< ColumnView > const &cols)
Construct a table from a vector of column views.
table_view_base(table_view_base &&)=default
Move constructor.
iterator begin() noexcept
Returns an iterator to the first view in the table.
ColumnView const & column(size_type column_index) const
Returns a reference to the view of the specified column.
const_iterator end() const noexcept
Returns an iterator one past the last column view in the table.
table_view_base & operator=(table_view_base &&)=default
Move assignment operator.
size_type num_columns() const noexcept
Returns the number of columns.
size_type is_empty() const noexcept
Returns true if num_columns() returns zero, or false otherwise.
decltype(std::begin(_columns)) iterator
Iterator type for the table.
size_type num_rows() const noexcept
Returns the number of rows.
iterator end() noexcept
Returns an iterator one past the last column view in the table.
const_iterator begin() const noexcept
Returns an iterator to the first view in the table.
decltype(std::cbegin(_columns)) const_iterator
const iterator type for the table
table_view_base(table_view_base const &)=default
Copy constructor.
table_view_base & operator=(table_view_base const &)=default
Copy assignment operator.
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
A set of mutable_column_views of the same size.
mutable_table_view(std::vector< mutable_table_view > const &views)
Construct a table from a vector of table views.
mutable_column_view & column(size_type column_index) const
Returns column at specified index.
A set of cudf::column_view's of the same size.
table_view select(InputIterator begin, InputIterator end) const
Returns a table_view built from a range of column indices.
table_view(std::vector< table_view > const &views)
Construct a table from a vector of table views.
table_view select(std::vector< size_type > const &column_indices) const
Returns a table_view with set of specified columns.
A set of cudf::column's of the same size.
column view class definitions
int32_t size_type
Row index type for columns and tables.
size_type distance(T f, T l)
Similar to std::distance but returns cudf::size_type and performs static_cast
bool nullable(table_view const &view)
Returns True if any of the columns in the table is nullable. (not entire hierarchy)
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.
std::vector< column_view > get_nullable_columns(table_view const &table)
The function to collect all nullable columns at all nested levels in a given table.
bool have_same_types(table_view const &lhs, table_view const &rhs)
Checks if two table_views have columns of same types.
bool has_nested_nullable_columns(table_view const &input)
Returns True if the table has a nullable column at any level of the column hierarchy.
bool has_nested_nulls(table_view const &input)
Returns True if the table has nulls in any of its columns hierarchy.
table_view scatter_columns(table_view const &source, std::vector< size_type > const &map, table_view const &target)
Copy column_views from a table_view into another table_view according to a column indices map.
bool is_relationally_comparable(TableView const &lhs, TableView const &rhs)
Indicates whether respective columns in input tables are relationally comparable.
bool has_nested_columns(table_view const &table)
Determine if any nested columns exist in a given table.
Type declarations for libcudf.