Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <timestamp-parse-util.h>
Public Member Functions | |
DateTimeFormatContext () | |
DateTimeFormatContext (const char *fmt, int fmt_len) | |
void | Reset (const char *fmt, int fmt_len) |
Public Attributes | |
const char * | fmt |
int | fmt_len |
int | fmt_out_len |
std::vector< DateTimeFormatToken > | toks |
bool | has_date_toks |
bool | has_time_toks |
This structure is used to hold metadata for a date/time format. Each token group within the raw format is parsed and placed in this structure along with other high level information e.g. if the format contains date and/or time tokens. This context is used during date/time parsing.
Definition at line 71 of file timestamp-parse-util.h.
|
inline |
Definition at line 85 of file timestamp-parse-util.h.
References Reset().
|
inline |
Definition at line 89 of file timestamp-parse-util.h.
References Reset().
|
inline |
Definition at line 93 of file timestamp-parse-util.h.
References fmt, fmt_len, fmt_out_len, has_date_toks, has_time_toks, and toks.
Referenced by DateTimeFormatContext(), impala::TimestampFunctions::FromUnix(), impala::TimestampParser::Init(), and impala::TimestampFunctions::Unix().
const char* impala::DateTimeFormatContext::fmt |
Definition at line 72 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::ParseFormatTokens(), and Reset().
int impala::DateTimeFormatContext::fmt_len |
Definition at line 73 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::ParseDateTime(), impala::TimestampParser::ParseFormatTokens(), Reset(), and impala::TEST().
int impala::DateTimeFormatContext::fmt_out_len |
Holds the expanded length of fmt_len plus any required space when short format tokens are used. The output buffer size is driven from this value. For example, in an output scenario a user may provide the format yyyy-M-d, if the day and month equates to 12, 21 then extra space is needed in the buffer to hold the values. The short format type e.g. yyyy-M-d is valid where no zero padding is required on single digits.
Definition at line 80 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::Format(), impala::TimestampFunctions::FromUnix(), impala::TimestampParser::ParseFormatTokens(), Reset(), and impala::TEST().
bool impala::DateTimeFormatContext::has_date_toks |
Definition at line 82 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::Format(), impala::TimestampParser::Parse(), impala::TimestampParser::ParseFormatTokens(), and Reset().
bool impala::DateTimeFormatContext::has_time_toks |
Definition at line 83 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::Format(), impala::TimestampParser::Parse(), impala::TimestampParser::ParseFormatTokens(), and Reset().
std::vector<DateTimeFormatToken> impala::DateTimeFormatContext::toks |
Definition at line 81 of file timestamp-parse-util.h.
Referenced by impala::TimestampParser::Format(), impala::TimestampParser::Parse(), impala::TimestampParser::ParseDateTime(), impala::TimestampParser::ParseFormatTokens(), and Reset().