20 #include <cudf/utilities/export.hpp>
36 namespace CUDF_EXPORT
cudf {
51 template <
typename ColumnView>
53 static_assert(std::is_same_v<ColumnView, column_view> or
54 std::is_same_v<ColumnView, mutable_column_view>,
55 "table_view_base can only be instantiated with column_view or "
59 std::vector<ColumnView> _columns{};
63 using iterator = decltype(std::begin(_columns));
129 return _columns.at(column_index);
239 template <
typename InputIterator>
243 std::transform(begin, end, columns.begin(), [
this](
auto index) { return this->column(index); });
369 std::vector<size_type>
const& map,
381 template <
typename TableView>
384 extern template bool is_relationally_comparable<table_view>(
table_view const& lhs,
386 extern template bool is_relationally_comparable<mutable_table_view>(
mutable_table_view const& lhs,
一个非拥有、不可变的设备数据视图,表示为元素的列,其中一些元素可能为空...
table_view_base(std::vector< ColumnView > const &cols)
从列视图向量构造表。
table_view_base(table_view_base &&)=default
移动构造函数。
iterator begin() noexcept
返回表中第一个视图的迭代器。
ColumnView const & column(size_type column_index) const
返回指定列视图的引用。
const_iterator end() const noexcept
返回表中最后一个列视图之后位置的迭代器。
table_view_base & operator=(table_view_base &&)=default
移动赋值运算符。
size_type num_columns() const noexcept
返回列数。
size_type is_empty() const noexcept
如果 num_columns() 返回零,则返回 true,否则返回 false。
decltype(std::begin(_columns)) iterator
表的迭代器类型。
size_type num_rows() const noexcept
返回行数。
iterator end() noexcept
返回表中最后一个列视图之后位置的迭代器。
const_iterator begin() const noexcept
返回表中第一个视图的迭代器。
decltype(std::cbegin(_columns)) const_iterator
表的 const 迭代器类型
table_view_base(table_view_base const &)=default
拷贝构造函数。
table_view_base & operator=(table_view_base const &)=default
拷贝赋值运算符。
一个非拥有、可变的设备数据视图,表示为元素的列,其中一些元素可能为空...
一组大小相同的 mutable_column_view。
mutable_table_view(std::vector< mutable_table_view > const &views)
从表视图向量构造表。
mutable_column_view & column(size_type column_index) const
返回指定索引处的列。
一组大小相同的 cudf::column_view。
table_view select(InputIterator begin, InputIterator end) const
从列索引范围构建并返回 table_view。
table_view(std::vector< table_view > const &views)
从表视图向量构造表。
table_view select(std::vector< size_type > const &column_indices) const
返回包含指定列集的 table_view。
int32_t size_type
列和表的行索引类型。
size_type distance(T f, T l)
类似于 std::distance,但返回 cudf::size_type 并执行 static_cast
bool nullable(table_view const &view)
如果表中任一列可空,则返回 True。(非整个层级结构)
bool has_nulls(table_view const &view)
如果表中任一列包含 null 值,则返回 True。
std::vector< column_view > get_nullable_columns(table_view const &table)
此函数用于收集给定表中所有嵌套级别的所有可空列。
bool has_nested_columns(table_view const &table)
确定给定表中是否存在任何嵌套列。
bool has_nested_nullable_columns(table_view const &input)
如果表在列层级结构的任一级别包含可空列,则返回 True。
bool has_nested_nulls(table_view const &input)
如果表在其列层级结构任一级别包含 null 值,则返回 True。
table_view scatter_columns(table_view const &source, std::vector< size_type > const &map, table_view const &target)
根据列索引映射将 column_view 从一个 table_view 复制到另一个 table_view 中。
bool is_relationally_comparable(TableView const &lhs, TableView const &rhs)
指示输入表中各自的列是否具有关系可比性。