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

Struct that describes the logical type annotation. More...

#include <parquet_schema.hpp>

Public Types

enum  Type : uint8_t {
  UNDEFINED , STRING , MAP , LIST ,
  ENUM , DECIMAL , DATE , TIME ,
  TIMESTAMP , INTEGER = 10 , UNKNOWN , JSON ,
  BSON
}
 Logical type annotations to replace ConvertedType.
 

Public Member Functions

 LogicalType (Type tp=Type::UNDEFINED)
 Default constructor. More...
 
 LogicalType (DecimalType &&dt)
 Constructor for Decimal logical type. More...
 
 LogicalType (TimeType &&tt)
 Constructor for Time logical type. More...
 
 LogicalType (TimestampType &&tst)
 Constructor for Timestamp logical type. More...
 
 LogicalType (IntType &&it)
 Constructor for Integer logical type. More...
 
constexpr CUDF_HOST_DEVICE bool is_time_millis () const
 Check if the time is in milliseconds. More...
 
constexpr CUDF_HOST_DEVICE bool is_time_micros () const
 Check if the time is in microseconds. More...
 
constexpr CUDF_HOST_DEVICE bool is_time_nanos () const
 Check if the time is in nanoseconds. More...
 
constexpr CUDF_HOST_DEVICE bool is_timestamp_millis () const
 Check if the timestamp is in milliseconds. More...
 
constexpr CUDF_HOST_DEVICE bool is_timestamp_micros () const
 Check if the timestamp is in microseconds. More...
 
constexpr CUDF_HOST_DEVICE bool is_timestamp_nanos () const
 Check if the timestamp is in nanoseconds. More...
 
constexpr CUDF_HOST_DEVICE int8_t bit_width () const
 Get the bit width of the integer type. More...
 
constexpr bool is_signed () const
 Check if the integer is signed. More...
 
constexpr int32_t scale () const
 Get the scale of the decimal type. More...
 
constexpr CUDF_HOST_DEVICE int32_t precision () const
 Get the precision of the decimal type. More...
 

Public Attributes

Type type
 Logical type.
 
cuda::std::optional< DecimalTypedecimal_type
 Decimal type.
 
cuda::std::optional< TimeTypetime_type
 Time type.
 
cuda::std::optional< TimestampTypetimestamp_type
 Timestamp type.
 
cuda::std::optional< IntTypeint_type
 Integer type.
 

Detailed Description

Struct that describes the logical type annotation.

Definition at line 253 of file parquet_schema.hpp.

Constructor & Destructor Documentation

◆ LogicalType() [1/5]

cudf::io::parquet::LogicalType::LogicalType ( Type  tp = Type::UNDEFINED)
inline

Default constructor.

Parameters
tpLogical type

Definition at line 288 of file parquet_schema.hpp.

◆ LogicalType() [2/5]

cudf::io::parquet::LogicalType::LogicalType ( DecimalType &&  dt)
inline

Constructor for Decimal logical type.

Parameters
dtDecimal type

Definition at line 295 of file parquet_schema.hpp.

◆ LogicalType() [3/5]

cudf::io::parquet::LogicalType::LogicalType ( TimeType &&  tt)
inline

Constructor for Time logical type.

Parameters
ttTime type

Definition at line 302 of file parquet_schema.hpp.

◆ LogicalType() [4/5]

cudf::io::parquet::LogicalType::LogicalType ( TimestampType &&  tst)
inline

Constructor for Timestamp logical type.

Parameters
tstTimestamp type

Definition at line 309 of file parquet_schema.hpp.

◆ LogicalType() [5/5]

cudf::io::parquet::LogicalType::LogicalType ( IntType &&  it)
inline

Constructor for Integer logical type.

Parameters
itInteger type

Definition at line 316 of file parquet_schema.hpp.

Member Function Documentation

◆ bit_width()

constexpr CUDF_HOST_DEVICE int8_t cudf::io::parquet::LogicalType::bit_width ( ) const
inlineconstexpr

Get the bit width of the integer type.

Returns
The bit width of the integer type, or -1 if the type is not an integer

Definition at line 383 of file parquet_schema.hpp.

◆ is_signed()

constexpr bool cudf::io::parquet::LogicalType::is_signed ( ) const
inlineconstexpr

Check if the integer is signed.

Returns
True if the integer is signed, false otherwise

Definition at line 393 of file parquet_schema.hpp.

◆ is_time_micros()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_time_micros ( ) const
inlineconstexpr

Check if the time is in microseconds.

Returns
True if the time is in microseconds, false otherwise

Definition at line 333 of file parquet_schema.hpp.

◆ is_time_millis()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_time_millis ( ) const
inlineconstexpr

Check if the time is in milliseconds.

Returns
True if the time is in milliseconds, false otherwise

Definition at line 323 of file parquet_schema.hpp.

◆ is_time_nanos()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_time_nanos ( ) const
inlineconstexpr

Check if the time is in nanoseconds.

Returns
True if the time is in nanoseconds, false otherwise

Definition at line 343 of file parquet_schema.hpp.

◆ is_timestamp_micros()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_timestamp_micros ( ) const
inlineconstexpr

Check if the timestamp is in microseconds.

Returns
True if the timestamp is in microseconds, false otherwise

Definition at line 363 of file parquet_schema.hpp.

◆ is_timestamp_millis()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_timestamp_millis ( ) const
inlineconstexpr

Check if the timestamp is in milliseconds.

Returns
True if the timestamp is in milliseconds, false otherwise

Definition at line 353 of file parquet_schema.hpp.

◆ is_timestamp_nanos()

constexpr CUDF_HOST_DEVICE bool cudf::io::parquet::LogicalType::is_timestamp_nanos ( ) const
inlineconstexpr

Check if the timestamp is in nanoseconds.

Returns
True if the timestamp is in nanoseconds, false otherwise

Definition at line 373 of file parquet_schema.hpp.

◆ precision()

constexpr CUDF_HOST_DEVICE int32_t cudf::io::parquet::LogicalType::precision ( ) const
inlineconstexpr

Get the precision of the decimal type.

Returns
The precision of the decimal type, or -1 if the type is not a decimal

Definition at line 410 of file parquet_schema.hpp.

◆ scale()

constexpr int32_t cudf::io::parquet::LogicalType::scale ( ) const
inlineconstexpr

Get the scale of the decimal type.

Returns
The scale of the decimal type, or -1 if the type is not a decimal

Definition at line 400 of file parquet_schema.hpp.


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