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

Metadata for a column. More...

#include <types.hpp>

Public Member Functions

 column_in_metadata (std::string_view name)
 Construct a new column in metadata object. More...
 
column_in_metadataadd_child (column_in_metadata const &child)
 Add the children metadata of this column. More...
 
column_in_metadataset_name (std::string const &name) noexcept
 Set the name of this column. More...
 
column_in_metadataset_nullability (bool nullable) noexcept
 Set the nullability of this column. More...
 
column_in_metadataset_list_column_as_map () noexcept
 Specify that this list column should be encoded as a map in the written file. More...
 
column_in_metadataset_int96_timestamps (bool req) noexcept
 Specifies whether this timestamp column should be encoded using the deprecated int96 physical type. Only valid for the following column types: timestamp_s, timestamp_ms, timestamp_us, timestamp_ns. More...
 
column_in_metadataset_decimal_precision (uint8_t precision) noexcept
 Set the decimal precision of this column. Only valid if this column is a decimal (fixed-point) type. More...
 
column_in_metadataset_parquet_field_id (int32_t field_id) noexcept
 Set the parquet field id of this column. More...
 
column_in_metadataset_output_as_binary (bool binary) noexcept
 Specifies whether this column should be written as binary or string data Only valid for the following column types: string. More...
 
column_in_metadatachild (size_type i) noexcept
 Get reference to a child of this column. More...
 
column_in_metadata const & child (size_type i) const noexcept
 Get const reference to a child of this column. More...
 
std::string get_name () const noexcept
 Get the name of this column. More...
 
bool is_nullability_defined () const noexcept
 Get whether nullability has been explicitly set for this column. More...
 
bool nullable () const
 Gets the explicitly set nullability for this column. More...
 
bool is_map () const noexcept
 If this is the metadata of a list column, returns whether it is to be encoded as a map. More...
 
bool is_enabled_int96_timestamps () const noexcept
 Get whether to encode this timestamp column using deprecated int96 physical type. More...
 
bool is_decimal_precision_set () const noexcept
 Get whether precision has been set for this decimal column. More...
 
uint8_t get_decimal_precision () const
 Get the decimal precision that was set for this column. More...
 
bool is_parquet_field_id_set () const noexcept
 Get whether parquet field id has been set for this column. More...
 
int32_t get_parquet_field_id () const
 Get the parquet field id that was set for this column. More...
 
size_type num_children () const noexcept
 Get the number of children of this column. More...
 
bool is_enabled_output_as_binary () const noexcept
 Get whether to encode this column as binary or string data. More...
 

Detailed Description

Metadata for a column.

Definition at line 578 of file io/types.hpp.

Constructor & Destructor Documentation

◆ column_in_metadata()

cudf::io::column_in_metadata::column_in_metadata ( std::string_view  name)
inline

Construct a new column in metadata object.

Parameters
nameColumn name

Definition at line 596 of file io/types.hpp.

Member Function Documentation

◆ add_child()

column_in_metadata& cudf::io::column_in_metadata::add_child ( column_in_metadata const &  child)
inline

Add the children metadata of this column.

Parameters
childThe children metadata of this column to add
Returns
this for chaining

Definition at line 603 of file io/types.hpp.

◆ child() [1/2]

column_in_metadata const& cudf::io::column_in_metadata::child ( size_type  i) const
inlinenoexcept

Get const reference to a child of this column.

Parameters
iIndex of the child to get
Returns
this for chaining

Definition at line 718 of file io/types.hpp.

◆ child() [2/2]

column_in_metadata& cudf::io::column_in_metadata::child ( size_type  i)
inlinenoexcept

Get reference to a child of this column.

Parameters
iIndex of the child to get
Returns
this for chaining

Definition at line 710 of file io/types.hpp.

◆ get_decimal_precision()

uint8_t cudf::io::column_in_metadata::get_decimal_precision ( ) const
inline

Get the decimal precision that was set for this column.

Exceptions
std::bad_optional_accessIf decimal precision was not set for this column. Check using is_decimal_precision_set() first.
Returns
The decimal precision that was set for this column

Definition at line 775 of file io/types.hpp.

◆ get_name()

std::string cudf::io::column_in_metadata::get_name ( ) const
inlinenoexcept

Get the name of this column.

Returns
The name of this column

Definition at line 725 of file io/types.hpp.

◆ get_parquet_field_id()

int32_t cudf::io::column_in_metadata::get_parquet_field_id ( ) const
inline

Get the parquet field id that was set for this column.

Exceptions
std::bad_optional_accessIf parquet field id was not set for this column. Check using is_parquet_field_id_set() first.
Returns
The parquet field id that was set for this column

Definition at line 794 of file io/types.hpp.

◆ is_decimal_precision_set()

bool cudf::io::column_in_metadata::is_decimal_precision_set ( ) const
inlinenoexcept

Get whether precision has been set for this decimal column.

Returns
Boolean indicating whether precision has been set for this decimal column

Definition at line 763 of file io/types.hpp.

◆ is_enabled_int96_timestamps()

bool cudf::io::column_in_metadata::is_enabled_int96_timestamps ( ) const
inlinenoexcept

Get whether to encode this timestamp column using deprecated int96 physical type.

Returns
Boolean indicating whether to encode this timestamp column using deprecated int96 physical type

Definition at line 756 of file io/types.hpp.

◆ is_enabled_output_as_binary()

bool cudf::io::column_in_metadata::is_enabled_output_as_binary ( ) const
inlinenoexcept

Get whether to encode this column as binary or string data.

Returns
Boolean indicating whether to encode this column as binary data

Definition at line 808 of file io/types.hpp.

◆ is_map()

bool cudf::io::column_in_metadata::is_map ( ) const
inlinenoexcept

If this is the metadata of a list column, returns whether it is to be encoded as a map.

Returns
Boolean indicating whether this column is to be encoded as a map

Definition at line 748 of file io/types.hpp.

◆ is_nullability_defined()

bool cudf::io::column_in_metadata::is_nullability_defined ( ) const
inlinenoexcept

Get whether nullability has been explicitly set for this column.

Returns
Boolean indicating whether nullability has been explicitly set for this column

Definition at line 732 of file io/types.hpp.

◆ is_parquet_field_id_set()

bool cudf::io::column_in_metadata::is_parquet_field_id_set ( ) const
inlinenoexcept

Get whether parquet field id has been set for this column.

Returns
Boolean indicating whether parquet field id has been set for this column

Definition at line 782 of file io/types.hpp.

◆ nullable()

bool cudf::io::column_in_metadata::nullable ( ) const
inline

Gets the explicitly set nullability for this column.

Exceptions
std::bad_optional_accessIf nullability is not explicitly defined for this column. Check using is_nullability_defined() first.
Returns
Boolean indicating whether this column is nullable

Definition at line 741 of file io/types.hpp.

◆ num_children()

size_type cudf::io::column_in_metadata::num_children ( ) const
inlinenoexcept

Get the number of children of this column.

Returns
The number of children of this column

Definition at line 801 of file io/types.hpp.

◆ set_decimal_precision()

column_in_metadata& cudf::io::column_in_metadata::set_decimal_precision ( uint8_t  precision)
inlinenoexcept

Set the decimal precision of this column. Only valid if this column is a decimal (fixed-point) type.

Parameters
precisionThe integer precision to set for this decimal column
Returns
this for chaining

Definition at line 667 of file io/types.hpp.

◆ set_int96_timestamps()

column_in_metadata& cudf::io::column_in_metadata::set_int96_timestamps ( bool  req)
inlinenoexcept

Specifies whether this timestamp column should be encoded using the deprecated int96 physical type. Only valid for the following column types: timestamp_s, timestamp_ms, timestamp_us, timestamp_ns.

Parameters
reqTrue = use int96 physical type. False = use int64 physical type
Returns
this for chaining

Definition at line 654 of file io/types.hpp.

◆ set_list_column_as_map()

column_in_metadata& cudf::io::column_in_metadata::set_list_column_as_map ( )
inlinenoexcept

Specify that this list column should be encoded as a map in the written file.

The column must have the structure list<struct<key, value>>. This option is invalid otherwise

Returns
this for chaining

Definition at line 640 of file io/types.hpp.

◆ set_name()

column_in_metadata& cudf::io::column_in_metadata::set_name ( std::string const &  name)
inlinenoexcept

Set the name of this column.

Parameters
nameName of the column
Returns
this for chaining

Definition at line 615 of file io/types.hpp.

◆ set_nullability()

column_in_metadata& cudf::io::column_in_metadata::set_nullability ( bool  nullable)
inlinenoexcept

Set the nullability of this column.

Parameters
nullableWhether this column is nullable
Returns
this for chaining

Definition at line 627 of file io/types.hpp.

◆ set_output_as_binary()

column_in_metadata& cudf::io::column_in_metadata::set_output_as_binary ( bool  binary)
inlinenoexcept

Specifies whether this column should be written as binary or string data Only valid for the following column types: string.

Parameters
binaryTrue = use binary data type. False = use string data type
Returns
this for chaining

Definition at line 693 of file io/types.hpp.

◆ set_parquet_field_id()

column_in_metadata& cudf::io::column_in_metadata::set_parquet_field_id ( int32_t  field_id)
inlinenoexcept

Set the parquet field id of this column.

Parameters
field_idThe parquet field id to set
Returns
this for chaining

Definition at line 679 of file io/types.hpp.


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