Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::DateTimeFormatContext Struct Reference

#include <timestamp-parse-util.h>

Collaboration diagram for impala::DateTimeFormatContext:

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< DateTimeFormatTokentoks
 
bool has_date_toks
 
bool has_time_toks
 

Detailed Description

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.

Constructor & Destructor Documentation

impala::DateTimeFormatContext::DateTimeFormatContext ( )
inline

Definition at line 85 of file timestamp-parse-util.h.

References Reset().

impala::DateTimeFormatContext::DateTimeFormatContext ( const char *  fmt,
int  fmt_len 
)
inline

Definition at line 89 of file timestamp-parse-util.h.

References Reset().

Member Function Documentation

void impala::DateTimeFormatContext::Reset ( const char *  fmt,
int  fmt_len 
)
inline

Member Data Documentation

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
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
bool impala::DateTimeFormatContext::has_time_toks

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