iceberg-cpp
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
iceberg::TransformUtil Class Reference

Static Public Member Functions

static std::string HumanYear (int32_t year)
 Returns a human-readable string for a year.
 
static std::string HumanMonth (int32_t month)
 Returns a human-readable string for a month.
 
static std::string HumanDay (int32_t day_ordinal)
 Returns a human-readable string for the given day ordinal.
 
static std::string HumanHour (int32_t hour_ordinal)
 Returns a human-readable string for the given hour ordinal.
 
static std::string HumanTime (int64_t micros_from_midnight)
 Outputs this time as a String, such as 10:15.
 
static std::string HumanTimestamp (int64_t timestamp_micros)
 Returns a string representation of a timestamp in microseconds.
 
static std::string HumanTimestampNs (int64_t timestamp_nanos)
 Returns a string representation of a timestamp in nanoseconds.
 
static std::string HumanTimestampWithZone (int64_t timestamp_micros)
 Returns a human-readable string representation of a timestamp with a time zone.
 
static std::string HumanTimestampNsWithZone (int64_t timestamp_nanos)
 Returns a string representation of a timestamp in nanoseconds with a time zone.
 

Member Function Documentation

◆ HumanDay()

std::string iceberg::TransformUtil::HumanDay ( int32_t  day_ordinal)
static

Returns a human-readable string for the given day ordinal.

The string is formatted as: yyyy-MM-dd.

Parameters
day_ordinalThe day ordinal.
Returns
A human-readable string for the given day ordinal.

◆ HumanHour()

std::string iceberg::TransformUtil::HumanHour ( int32_t  hour_ordinal)
static

Returns a human-readable string for the given hour ordinal.

The string is formatted as: yyyy-MM-dd-HH.

Parameters
hour_ordinalThe hour ordinal.
Returns
A human-readable string for the given hour ordinal.

◆ HumanMonth()

std::string iceberg::TransformUtil::HumanMonth ( int32_t  month)
static

Returns a human-readable string for a month.

The string is formatted as "yyyy-MM".

Parameters
monthThe month to format.
Returns
A human-readable string for the month.

◆ HumanTime()

std::string iceberg::TransformUtil::HumanTime ( int64_t  micros_from_midnight)
static

Outputs this time as a String, such as 10:15.

The output will be one of the following ISO-8601 formats: HH:mm HH:mm:ss HH:mm:ss.SSS HH:mm:ss.SSSSSS The format used will be the shortest that outputs the full value of the time where the omitted parts are implied to be zero.

Parameters
microseconds_from_midnightthe time in microseconds from midnight
Returns
a string representation of this time

◆ HumanTimestamp()

std::string iceberg::TransformUtil::HumanTimestamp ( int64_t  timestamp_micros)
static

Returns a string representation of a timestamp in microseconds.

The output will be one of the following forms, according to the precision of the timestamp:

  • yyyy-MM-ddTHH:mm:ss
  • yyyy-MM-ddTHH:mm:ss.SSS
  • yyyy-MM-ddTHH:mm:ss.SSSSSS
Parameters
timestamp_microsthe timestamp in microseconds.
Returns
a string representation of this timestamp.

◆ HumanTimestampNs()

std::string iceberg::TransformUtil::HumanTimestampNs ( int64_t  timestamp_nanos)
static

Returns a string representation of a timestamp in nanoseconds.

The output will be one of the following forms, according to the precision of the timestamp:

  • yyyy-MM-ddTHH:mm:ss
  • yyyy-MM-ddTHH:mm:ss.SSS
  • yyyy-MM-ddTHH:mm:ss.SSSSSS
  • yyyy-MM-ddTHH:mm:ss.SSSSSSSSS
Parameters
timestamp_nanosthe timestamp in nanoseconds.
Returns
a string representation of this timestamp.

◆ HumanTimestampNsWithZone()

std::string iceberg::TransformUtil::HumanTimestampNsWithZone ( int64_t  timestamp_nanos)
static

Returns a string representation of a timestamp in nanoseconds with a time zone.

The output will be one of the following forms, according to the precision of the timestamp:

  • yyyy-MM-ddTHH:mm:ss+00:00
  • yyyy-MM-ddTHH:mm:ss.SSS+00:00
  • yyyy-MM-ddTHH:mm:ss.SSSSSS+00:00
  • yyyy-MM-ddTHH:mm:ss.SSSSSSSSS+00:00
Parameters
timestamp_nanosthe timestamp in nanoseconds.
Returns
a string representation of this timestamp.

◆ HumanTimestampWithZone()

std::string iceberg::TransformUtil::HumanTimestampWithZone ( int64_t  timestamp_micros)
static

Returns a human-readable string representation of a timestamp with a time zone.

The output will be one of the following forms, according to the precision of the timestamp:

  • yyyy-MM-ddTHH:mm:ss+00:00
  • yyyy-MM-ddTHH:mm:ss.SSS+00:00
  • yyyy-MM-ddTHH:mm:ss.SSSSSS+00:00
Parameters
timestamp_microsthe timestamp in microseconds.
Returns
a string representation of this timestamp.

◆ HumanYear()

std::string iceberg::TransformUtil::HumanYear ( int32_t  year)
static

Returns a human-readable string for a year.

The string is formatted as "yyyy".

Parameters
yearThe year to format.
Returns
A human-readable string for the year.

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