Public Member Functions | Static Public Member Functions | List of all members
cudf::io::orc_reader_options Class Reference

Settings to use for read_orc(). More...

#include <orc.hpp>

Public Member Functions

 orc_reader_options ()=default
 Default constructor. More...
 
source_info const & get_source () const
 Returns source info. More...
 
auto const & get_columns () const
 Returns names of the columns to read, if set. More...
 
auto const & get_stripes () const
 Returns vector of vectors, stripes to read for each input source. More...
 
int64_t get_skip_rows () const
 Returns number of rows to skip from the start. More...
 
std::optional< int64_t > const & get_num_rows () const
 Returns number of row to read. More...
 
bool is_enabled_use_index () const
 Whether to use row index to speed-up reading. More...
 
bool is_enabled_use_np_dtypes () const
 Whether to use numpy-compatible dtypes. More...
 
data_type get_timestamp_type () const
 Returns timestamp type to which timestamp column will be cast. More...
 
std::vector< std::string > const & get_decimal128_columns () const
 Returns fully qualified names of columns that should be read as 128-bit Decimal. More...
 
void set_columns (std::vector< std::string > col_names)
 Sets names of the column to read. More...
 
void set_stripes (std::vector< std::vector< size_type >> stripes)
 Sets list of stripes to read for each input source. More...
 
void set_skip_rows (int64_t rows)
 Sets number of rows to skip from the start. More...
 
void set_num_rows (int64_t nrows)
 Sets number of row to read. More...
 
void enable_use_index (bool use)
 Enable/Disable use of row index to speed-up reading. More...
 
void enable_use_np_dtypes (bool use)
 Enable/Disable use of numpy-compatible dtypes. More...
 
void set_timestamp_type (data_type type)
 Sets timestamp type to which timestamp column will be cast. More...
 
void set_decimal128_columns (std::vector< std::string > val)
 Set columns that should be read as 128-bit Decimal. More...
 

Static Public Member Functions

static orc_reader_options_builder builder (source_info src)
 Creates orc_reader_options_builder which will build orc_reader_options. More...
 

Detailed Description

Settings to use for read_orc().

Definition at line 55 of file orc.hpp.

Constructor & Destructor Documentation

◆ orc_reader_options()

cudf::io::orc_reader_options::orc_reader_options ( )
default

Default constructor.

This has been added since Cython requires a default constructor to create objects on stack.

Member Function Documentation

◆ builder()

static orc_reader_options_builder cudf::io::orc_reader_options::builder ( source_info  src)
static

Creates orc_reader_options_builder which will build orc_reader_options.

Parameters
srcSource information to read orc file
Returns
Builder to build reader options

◆ enable_use_index()

void cudf::io::orc_reader_options::enable_use_index ( bool  use)
inline

Enable/Disable use of row index to speed-up reading.

Parameters
useBoolean value to enable/disable row index use

Definition at line 233 of file orc.hpp.

◆ enable_use_np_dtypes()

void cudf::io::orc_reader_options::enable_use_np_dtypes ( bool  use)
inline

Enable/Disable use of numpy-compatible dtypes.

Parameters
useBoolean value to enable/disable

Definition at line 240 of file orc.hpp.

◆ get_columns()

auto const& cudf::io::orc_reader_options::get_columns ( ) const
inline

Returns names of the columns to read, if set.

Returns
Names of the columns to read; nullopt if the option is not set

Definition at line 116 of file orc.hpp.

◆ get_decimal128_columns()

std::vector<std::string> const& cudf::io::orc_reader_options::get_decimal128_columns ( ) const
inline

Returns fully qualified names of columns that should be read as 128-bit Decimal.

Returns
Fully qualified names of columns that should be read as 128-bit Decimal

Definition at line 166 of file orc.hpp.

◆ get_num_rows()

std::optional<int64_t> const& cudf::io::orc_reader_options::get_num_rows ( ) const
inline

Returns number of row to read.

Returns
Number of rows to read; nullopt if the option hasn't been set (in which case the file is read until the end)

Definition at line 138 of file orc.hpp.

◆ get_skip_rows()

int64_t cudf::io::orc_reader_options::get_skip_rows ( ) const
inline

Returns number of rows to skip from the start.

Returns
Number of rows to skip from the start

Definition at line 130 of file orc.hpp.

◆ get_source()

source_info const& cudf::io::orc_reader_options::get_source ( ) const
inline

Returns source info.

Returns
Source info

Definition at line 109 of file orc.hpp.

◆ get_stripes()

auto const& cudf::io::orc_reader_options::get_stripes ( ) const
inline

Returns vector of vectors, stripes to read for each input source.

Returns
Vector of vectors, stripes to read for each input source

Definition at line 123 of file orc.hpp.

◆ get_timestamp_type()

data_type cudf::io::orc_reader_options::get_timestamp_type ( ) const
inline

Returns timestamp type to which timestamp column will be cast.

Returns
Timestamp type to which timestamp column will be cast

Definition at line 159 of file orc.hpp.

◆ is_enabled_use_index()

bool cudf::io::orc_reader_options::is_enabled_use_index ( ) const
inline

Whether to use row index to speed-up reading.

Returns
true if row index is used to speed-up reading

Definition at line 145 of file orc.hpp.

◆ is_enabled_use_np_dtypes()

bool cudf::io::orc_reader_options::is_enabled_use_np_dtypes ( ) const
inline

Whether to use numpy-compatible dtypes.

Returns
true if numpy-compatible dtypes are used

Definition at line 152 of file orc.hpp.

◆ set_columns()

void cudf::io::orc_reader_options::set_columns ( std::vector< std::string >  col_names)
inline

Sets names of the column to read.

Parameters
col_namesVector of column names

Definition at line 178 of file orc.hpp.

◆ set_decimal128_columns()

void cudf::io::orc_reader_options::set_decimal128_columns ( std::vector< std::string >  val)
inline

Set columns that should be read as 128-bit Decimal.

Parameters
valVector of fully qualified column names

Definition at line 254 of file orc.hpp.

◆ set_num_rows()

void cudf::io::orc_reader_options::set_num_rows ( int64_t  nrows)
inline

Sets number of row to read.

Parameters
nrowsNumber of rows
Exceptions
cudf::logic_errorif a negative value is passed
cudf::logic_errorif stripes have been previously set

Definition at line 221 of file orc.hpp.

◆ set_skip_rows()

void cudf::io::orc_reader_options::set_skip_rows ( int64_t  rows)
inline

Sets number of rows to skip from the start.

Parameters
rowsNumber of rows
Exceptions
cudf::logic_errorif a negative value is passed
cudf::logic_errorif stripes have been previously set

Definition at line 206 of file orc.hpp.

◆ set_stripes()

void cudf::io::orc_reader_options::set_stripes ( std::vector< std::vector< size_type >>  stripes)
inline

Sets list of stripes to read for each input source.

Parameters
stripesVector of vectors, mapping stripes to read to input sources
Exceptions
cudf::logic_errorif a non-empty vector is passed, and skip_rows has been previously set
cudf::logic_errorif a non-empty vector is passed, and num_rows has been previously set

Definition at line 190 of file orc.hpp.

◆ set_timestamp_type()

void cudf::io::orc_reader_options::set_timestamp_type ( data_type  type)
inline

Sets timestamp type to which timestamp column will be cast.

Parameters
typeType of timestamp

Definition at line 247 of file orc.hpp.


The documentation for this class was generated from the following file: