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

Method FromUtcAndToUtcPrepare

be/src/exprs/timestamp-functions.cc:87–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85};
86
87void TimestampFunctions::FromUtcAndToUtcPrepare(FunctionContext* context,
88 FunctionContext::FunctionStateScope scope) {
89 if (scope != FunctionContext::FRAGMENT_LOCAL) return;
90 const Timezone* timezone = nullptr;
91 if (context->IsArgConstant(1)) {
92 StringVal tz_string_val = *reinterpret_cast<StringVal*>(context->GetConstantArg(1));
93 const StringValue& tz_string_value = StringValue::FromStringVal(tz_string_val);
94 timezone = TimezoneDatabase::FindTimezone(
95 string(tz_string_value.Ptr(), tz_string_value.Len()));
96 }
97 context->SetFunctionState(scope, (void *)(timezone));
98}
99
100const Timezone* GetTimezone(FunctionContext* context,
101 const StringValue& tz_string_value) {

Callers

nothing calls this directly

Calls 5

IsArgConstantMethod · 0.80
GetConstantArgMethod · 0.80
SetFunctionStateMethod · 0.80
PtrMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected