Module parse

Source
Expand description

Parser implementations for converting strings to Arrow types

Used by the CSV and JSON readers to convert strings to Arrow types

Macros§

parser_primitive πŸ”’

Structs§

Interval πŸ”’
IntervalAmount πŸ”’
IntervalParseConfig
Config to parse interval strings
TimestampParser πŸ”’
Helper for parsing RFC3339 timestamps

Enums§

IntervalUnit
Represents the units of an interval, with each variant corresponding to a bit in the interval’s bitfield representation

Constants§

EPOCH_DAYS_FROM_CE πŸ”’
Number of days between 0001-01-01 and 1970-01-01
ERR_NANOSECONDS_NOT_SUPPORTED πŸ”’
Error message if nanosecond conversion request beyond supported interval
INTERVAL_PRECISION πŸ”’
Chosen based on the number of decimal digits in 1 week in nanoseconds
NANOS_PER_HOUR πŸ”’
NANOS_PER_MILLIS πŸ”’
NANOS_PER_MINUTE πŸ”’
NANOS_PER_SECOND πŸ”’

Traits§

Parser
Specialized parsing implementations to convert strings to Arrow types.

Functions§

is_some_and πŸ”’
This API is only stable since 1.70 so can’t use it when current MSRV is lower
not_interval_amount πŸ”’
test if a character is NOT part of an interval numeric amount
parse_date πŸ”’
parse_decimal
Parse the string format decimal value to i128/i256 format and checking the precision and scale. The result value can’t be out of bounds.
parse_e_notation πŸ”’
parse_interval_components πŸ”’
parse the string into a vector of interval components i.e. (amount, unit) tuples
parse_interval_day_time
Parse human-readable interval string to Arrow [IntervalDayTimeType]
parse_interval_month_day_nano
Parse human-readable interval string to Arrow [IntervalMonthDayNanoType]
parse_interval_month_day_nano_config
Parse human-readable interval string to Arrow [IntervalMonthDayNanoType]
parse_interval_year_month
Parse human-readable interval string to Arrow [IntervalYearMonthType]
parse_nanos πŸ”’
Parse nanoseconds from the first N values in digits, subtracting the offset O
split_interval_components πŸ”’
Split an interval into a vec of amounts and units.
string_to_datetime
Accepts a string and parses it relative to the provided timezone
string_to_time πŸ”’
string_to_time_nanoseconds
Accepts a string in ISO8601 standard format and some variants and converts it to nanoseconds since midnight.
string_to_timestamp_nanos
Accepts a string in RFC3339 / ISO8601 standard format and some variants and converts it to a nanosecond precision timestamp.
to_timestamp_nanos πŸ”’
Fallible conversion of NaiveDateTime to i64 nanoseconds

Type Aliases§

MonthDayNano
A tuple representing (months, days, nanoseconds) in an interval