read_parquet()
的设置。 更多...
#include <parquet.hpp>
公有成员函数 | |
parquet_reader_options ()=default | |
默认构造函数。 更多... | |
source_info const & | get_source () const |
返回源信息。 更多... | |
bool | is_enabled_convert_strings_to_categories () const |
根据字符串是否应转换为类别返回 true/false。 更多... | |
bool | is_enabled_use_pandas_metadata () const |
根据读取时是否使用 pandas 元数据返回 true/false。 更多... | |
bool | is_enabled_use_arrow_schema () const |
根据读取时是否使用 arrow schema 返回 true/false。 更多... | |
bool | is_enabled_allow_mismatched_pq_schemas () const |
根据是否读取不匹配 Parquet 源中的匹配投影和过滤列返回 true/false。 更多... | |
std::optional< std::vector< reader_column_schema > > | get_column_schema () const |
返回可选的元数据树。 更多... | |
int64_t | get_skip_rows () const |
返回从开始跳过的行数。 更多... | |
std::optional< size_type > const & | get_num_rows () const |
返回要读取的行数。 更多... | |
auto const & | get_columns () const |
返回要读取的列名(如果已设置)。 更多... | |
auto const & | get_row_groups () const |
返回要读取的独立行组列表。 更多... | |
auto const & | get_filter () const |
返回用于谓词下推的 AST 基础过滤器。 更多... | |
data_type | get_timestamp_type () const |
返回用于转换时间戳列的时间戳类型。 更多... | |
void | set_columns (std::vector< std::string > col_names) |
设置要读取的列名。 更多... | |
void | set_row_groups (std::vector< std::vector< size_type >> row_groups) |
设置要读取的独立行组向量。 更多... | |
void | set_filter (ast::expression const &filter) |
设置用于谓词下推的 AST 基础过滤器。 更多... | |
void | enable_convert_strings_to_categories (bool val) |
设置启用/禁用字符串到类别的转换。 更多... | |
void | enable_use_pandas_metadata (bool val) |
设置启用/禁用读取时使用 pandas 元数据。 更多... | |
void | enable_use_arrow_schema (bool val) |
设置启用/禁用读取时使用 arrow schema。 更多... | |
void | enable_allow_mismatched_pq_schemas (bool val) |
设置启用/禁用读取不匹配 Parquet 源中的匹配投影和过滤列。 更多... | |
void | set_column_schema (std::vector< reader_column_schema > val) |
设置读取器列 schema。 更多... | |
void | set_skip_rows (int64_t val) |
设置要跳过的行数。 更多... | |
void | set_num_rows (size_type val) |
设置要读取的行数。 更多... | |
void | set_timestamp_type (data_type type) |
设置用于转换时间戳列的 timestamp_type。 更多... | |
静态公有成员函数 | |
static parquet_reader_options_builder | builder (source_info src) |
创建一个 parquet_reader_options_builder,用于构建 parquet_reader_options。 更多... | |
read_parquet()
的设置。
定义于文件 parquet.hpp 的 56 行。
|
explicitdefault |
默认构造函数。
添加此构造函数是因为 Cython 需要一个默认构造函数来在堆栈上创建对象。
|
static |
创建一个 parquet_reader_options_builder,用于构建 parquet_reader_options。
src | 用于读取 parquet 文件的源信息 |
|
inline |
设置启用/禁用读取不匹配 Parquet 源中的匹配投影和过滤列。
val | 布尔值,表示是否读取不匹配 Parquet 源中的匹配投影和过滤列。 |
定义于文件 parquet.hpp 的 281 行。
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
根据是否读取不匹配 Parquet 源中的匹配投影和过滤列返回 true/false。
true
。定义于文件 parquet.hpp 的 149 行。
|
inline |
|
inline |
|
inline |
|
inline |
Sets reader column schema.
val | Schema 节点的树,用于启用/禁用二进制到字符串列的转换。请注意,默认是转换为字符串列。 |
定义于文件 parquet.hpp 的 289 行。
|
inline |
|
inline |
设置用于谓词下推的 AST 基础过滤器。
过滤器可以使用 cudf::ast::column_name_reference 按名称引用列,即使该列不一定存在于请求的投影列中。要引用输出列索引,您可以使用 cudf::ast::column_reference。
对于列为 ["A", "B", "C", ... "X", "Y", "Z"] 的 parquet 文件,示例 1:带/不带列投影
列 "C" 不需要出现在输出表中。示例 2:不带列投影
在这里,1
将指向列 "B",因为输出将按 ["A", ..., "Z"] 的顺序包含所有列。示例 3:带列投影
在这里,1
将指向列 "Z",因为输出将按 ["A", "Z", "X"] 的顺序包含 3 列。
filter | 用作过滤器的 AST 表达式 |
定义于文件 parquet.hpp 的 251 行。
void cudf::io::parquet_reader_options::set_num_rows | ( | size_type | val | ) |
设置要读取的行数。
val | 跳过指定行数后要读取的行数 |
void cudf::io::parquet_reader_options::set_row_groups | ( | std::vector< std::vector< size_type >> | row_groups | ) |
设置要读取的独立行组向量。
row_groups | 要读取的行组向量 |
void cudf::io::parquet_reader_options::set_skip_rows | ( | int64_t | val | ) |
设置要跳过的行数。
val | 从开始跳过的行数 |
|
inline |