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

Method ToStringVal

be/src/runtime/timestamp-value.inline.h:226–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226inline StringVal TimestampValue::ToStringVal(
227 FunctionContext* ctx, const DateTimeFormatContext& dt_ctx) const {
228 int max_length = dt_ctx.fmt_out_len;
229 StringVal sv(ctx, max_length);
230 int written = TimestampParser::Format(
231 dt_ctx, date_, time_, max_length, reinterpret_cast<char*>(sv.ptr));
232 if (UNLIKELY(written < 0)) {
233 sv.is_null = true;
234 } else {
235 sv.Resize(ctx, written);
236 }
237 return sv;
238}
239
240inline StringVal TimestampValue::ToStringVal(FunctionContext* ctx) const {
241 const DateTimeFormatContext* dt_ctx =

Callers 9

ParseUrlMethod · 0.45
ParseUrlKeyMethod · 0.45
FromUnixMethod · 0.45
CastToStringValMethod · 0.45
SetAnyValMethod · 0.45
LeastGreatestMethod · 0.45

Calls 3

FormatEnum · 0.50
ToStringValFunction · 0.50
ResizeMethod · 0.45

Tested by

no test coverage detected