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

Function ValidateOpenPrepare

be/src/testutil/test-udfs.cc:363–370  ·  view source on GitHub ↗

ValidateOpen UDF: returns true if the UDF was opened, false otherwise. Can also be used to validate close since it will leak if it's not closed.

Source from the content-addressed store, hash-verified

361// ValidateOpen UDF: returns true if the UDF was opened, false otherwise. Can also be
362// used to validate close since it will leak if it's not closed.
363IMPALA_UDF_EXPORT
364void ValidateOpenPrepare(
365 FunctionContext* context, FunctionContext::FunctionStateScope scope) {
366 if (scope == FunctionContext::THREAD_LOCAL) {
367 uint8_t* state = context->Allocate(100);
368 context->SetFunctionState(scope, state);
369 }
370}
371
372IMPALA_UDF_EXPORT
373BooleanVal ValidateOpen(FunctionContext* context, const IntVal& dummy) {

Callers

nothing calls this directly

Calls 2

SetFunctionStateMethod · 0.80
AllocateMethod · 0.45

Tested by

no test coverage detected