| 224 | } |
| 225 | |
| 226 | inline 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 | |
| 240 | inline StringVal TimestampValue::ToStringVal(FunctionContext* ctx) const { |
| 241 | const DateTimeFormatContext* dt_ctx = |
no test coverage detected