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

Method ToTimestampVal

be/src/runtime/timestamp-value.h:155–163  ·  view source on GitHub ↗

Returns a TimestampVal representation in the output variable. Returns null if the TimestampValue instance doesn't have a valid date or time.

Source from the content-addressed store, hash-verified

153 /// Returns a TimestampVal representation in the output variable.
154 /// Returns null if the TimestampValue instance doesn't have a valid date or time.
155 void ToTimestampVal(impala_udf::TimestampVal* tv) const {
156 if (!HasDate()) {
157 tv->is_null = true;
158 return;
159 }
160 memcpy(&tv->date, &date_, sizeof(date_));
161 memcpy(&tv->time_of_day, &time_, sizeof(time_));
162 tv->is_null = false;
163 }
164
165 void ToPtime(boost::posix_time::ptime* ptp) const {
166 *ptp = boost::posix_time::ptime(date_, time_);

Callers 15

ConvertToTimestampValMethod · 0.80
TimestampAvgGetValueMethod · 0.80
ToTimestampMethod · 0.80
NowMethod · 0.80
UtcTimestampMethod · 0.80
LastDayMethod · 0.80
AddSubMethod · 0.80
CastToTimestampValMethod · 0.80
FromUtcMethod · 0.80
ToUtcMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestTimestampMethod · 0.64