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

Method TemplatedIn

be/src/exprs/in-predicate.h:347–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345
346template <typename T, typename SetType, bool not_in, InPredicate::Strategy strategy>
347inline impala_udf::BooleanVal InPredicate::TemplatedIn(
348 impala_udf::FunctionContext* ctx, const T& val, int num_args, const T* args) {
349 if (val.is_null) return BooleanVal::null();
350
351 BooleanVal found;
352 if (strategy == SET_LOOKUP) {
353 SetLookupState<SetType>* state = reinterpret_cast<SetLookupState<SetType>*>(
354 ctx->GetFunctionState(FunctionContext::FRAGMENT_LOCAL));
355 DCHECK(state != NULL);
356 found = SetLookup(state, val);
357 } else {
358 DCHECK_EQ(strategy, ITERATE);
359 found = Iterate(ctx->GetArgType(0), val, num_args, args);
360 }
361 if (found.is_null) return BooleanVal::null();
362 return BooleanVal(found.val ^ not_in);
363}
364
365template <typename T, typename SetType>
366void InPredicate::SetLookupPrepare(

Callers

nothing calls this directly

Calls 4

IterateFunction · 0.85
BooleanValClass · 0.85
GetFunctionStateMethod · 0.80
GetArgTypeMethod · 0.80

Tested by

no test coverage detected