Public Member Functions | Public Attributes | List of all members
cudf::io::parquet::SchemaElement Struct Reference

Struct for describing an element/field in the Parquet format schema. More...

#include <parquet_schema.hpp>

Public Member Functions

bool operator== (SchemaElement const &other) const
 Check if two schema elements are equal. More...
 
bool is_stub () const
 Check if the schema element is a stub. More...
 
bool is_one_level_list (SchemaElement const &parent) const
 Check if the schema element is a one-level list. More...
 
bool is_list () const
 Check if the schema element is a list. More...
 
bool is_struct () const
 Check if the schema element is a struct. More...
 

Public Attributes

Type type = Type::UNDEFINED
 1: parquet physical type for output
 
int32_t type_length = 0
 2: byte length of FIXED_LENGTH_BYTE_ARRAY elements, or maximum bit length for other types
 
FieldRepetitionType repetition_type = FieldRepetitionType::REQUIRED
 3: repetition of the field
 
std::string name = ""
 4: name of the field
 
int32_t num_children = 0
 5: nested fields
 
std::optional< ConvertedTypeconverted_type
 6: DEPRECATED: record the original type before conversion to parquet type
 
int32_t decimal_scale = 0
 7: DEPRECATED: record the scale for DECIMAL converted type
 
int32_t decimal_precision = 0
 8: DEPRECATED: record the precision for DECIMAL converted type
 
std::optional< int32_t > field_id
 9: save field_id from original schema
 
std::optional< LogicalTypelogical_type
 10: replaces converted type
 
bool output_as_byte_array = false
 extra cudf specific fields
 
std::optional< type_idarrow_type
 cudf type determined from arrow:schema
 
int max_definition_level = 0
 Maximum definition level.
 
int max_repetition_level = 0
 Maximum repetition level.
 
size_type parent_idx = 0
 Parent index.
 
std::vector< size_typechildren_idx
 Children indices.
 

Detailed Description

Struct for describing an element/field in the Parquet format schema.

Parquet is a strongly-typed format so the file layout can be interpreted as as a schema tree.

Definition at line 423 of file parquet_schema.hpp.

Member Function Documentation

◆ is_list()

bool cudf::io::parquet::SchemaElement::is_list ( ) const
inline

Check if the schema element is a list.

Returns
True if the schema element is a list, false otherwise

Definition at line 530 of file parquet_schema.hpp.

◆ is_one_level_list()

bool cudf::io::parquet::SchemaElement::is_one_level_list ( SchemaElement const &  parent) const
inline

Check if the schema element is a one-level list.

https://github.com/apache/parquet-cpp/blob/642da05/src/parquet/schema.h#L49-L50 One-level LIST encoding: Only allows required lists with required cells: repeated value_type name

Parameters
parentThe parent schema element
Returns
True if the schema element is a one-level list, false otherwise

Definition at line 519 of file parquet_schema.hpp.

◆ is_struct()

bool cudf::io::parquet::SchemaElement::is_struct ( ) const
inline

Check if the schema element is a struct.

In parquet terms, a group is a level of nesting in the schema. a group can be a struct or a list

Returns
True if the schema element is a struct, false otherwise

Definition at line 540 of file parquet_schema.hpp.

◆ is_stub()

bool cudf::io::parquet::SchemaElement::is_stub ( ) const
inline

Check if the schema element is a stub.

Returns
True if the schema element is a stub, false otherwise

Definition at line 504 of file parquet_schema.hpp.

◆ operator==()

bool cudf::io::parquet::SchemaElement::operator== ( SchemaElement const &  other) const
inline

Check if two schema elements are equal.

Parameters
otherThe other schema element to compare to
Returns
True if the two schema elements are equal, false otherwise

Definition at line 468 of file parquet_schema.hpp.


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