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_type_length (int32_t length) noexcept
 Set the data length of the column. Only valid if this column is a fixed-length byte array. 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_metadataset_skip_compression (bool skip) noexcept
 Specifies whether this column should not be compressed regardless of the compression codec specified for the file. More...
 
column_in_metadataset_encoding (column_encoding encoding) noexcept
 Sets the encoding to use for this column. 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_type_length_set () const noexcept
 Get whether type length has been set for this column. More...
 
uint8_t get_type_length () const
 Get the type length 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...
 
bool is_enabled_skip_compression () const noexcept
 Get whether to skip compressing this column. More...
 
column_encoding get_encoding () const
 Get the encoding that was set for this column. More...
 

Detailed Description

Metadata for a column.

Definition at line 604 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 625 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 632 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 789 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 781 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 846 of file io/types.hpp.

◆ get_encoding()

column_encoding cudf::io::column_in_metadata::get_encoding ( ) const
inline

Get the encoding that was set for this column.

Returns
The encoding that was set for this column

Definition at line 909 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 796 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 881 of file io/types.hpp.

◆ get_type_length()

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

Get the type length that was set for this column.

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

Definition at line 862 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 834 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 827 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 895 of file io/types.hpp.

◆ is_enabled_skip_compression()

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

Get whether to skip compressing this column.

Returns
Boolean indicating whether to skip compression of this column

Definition at line 902 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 819 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 803 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 869 of file io/types.hpp.

◆ is_type_length_set()

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

Get whether type length has been set for this column.

Returns
Boolean indicating whether type length has been set for this column

Definition at line 853 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 812 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 888 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 696 of file io/types.hpp.

◆ set_encoding()

column_in_metadata& cudf::io::column_in_metadata::set_encoding ( column_encoding  encoding)
inlinenoexcept

Sets the encoding to use for this column.

This is just a request, and the encoder may still choose to use a different encoding depending on resource constraints. Use the constants defined in the parquet_encoding struct.

Parameters
encodingThe encoding to use
Returns
this for chaining

Definition at line 769 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 683 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 669 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 644 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 656 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 735 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 721 of file io/types.hpp.

◆ set_skip_compression()

column_in_metadata& cudf::io::column_in_metadata::set_skip_compression ( bool  skip)
inlinenoexcept

Specifies whether this column should not be compressed regardless of the compression codec specified for the file.

Parameters
skipIf true do not compress this column
Returns
this for chaining

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

◆ set_type_length()

column_in_metadata& cudf::io::column_in_metadata::set_type_length ( int32_t  length)
inlinenoexcept

Set the data length of the column. Only valid if this column is a fixed-length byte array.

Parameters
lengthThe data length to set for this column
Returns
this for chaining

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


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