MCPcopy Create free account
hub / github.com/apache/impala / DateToken

Class DateToken

be/src/runtime/date-test.cc:118–138  ·  view source on GitHub ↗

Used to represent a parsed date token. For example, it may represent a year.

Source from the content-addressed store, hash-verified

116
117// Used to represent a parsed date token. For example, it may represent a year.
118struct DateToken {
119 const char* fmt;
120 int val;
121 const char* month_name;
122
123 DateToken(const char* fmt, int val)
124 : fmt(fmt),
125 val(val),
126 month_name(nullptr) {
127 }
128
129 DateToken(const char* month_fmt, int month_val, const char* month_name)
130 : fmt(month_fmt),
131 val(month_val),
132 month_name(month_name) {
133 }
134
135 friend bool operator<(const DateToken& lhs, const DateToken& rhs) {
136 return strcmp(lhs.fmt, rhs.fmt) < 0;
137 }
138};
139
140void TestDateTokens(const vector<DateToken>& toks, int year, int month, int day,
141 const char* separator) {

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68