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

Method ShouldCodegen

be/src/exprs/scalar-expr.cc:327–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327bool ScalarExpr::ShouldCodegen(const FragmentState* state) const {
328 // Use the interpreted path and call the builtin without codegen if any of the
329 // followings is true:
330 // 1. The expression does not have an associated RuntimeState, e.g. is a partition
331 // key expression in a descriptor table.
332 // 2. codegen is disabled by query option.
333 // 3. there is an optimization hint to disable codegen and the expr can be interpreted.
334 // 4. Optimizer decided to disable codegen. Example: const expressions in VALUES()
335 // which are evaluated only once.
336 return state != nullptr && !state->CodegenDisabledByQueryOption()
337 && !((state->CodegenHasDisableHint() || is_codegen_disabled_) && IsInterpretable());
338}
339
340int ScalarExpr::GetSlotIds(vector<SlotId>* slot_ids) const {
341 int n = 0;

Callers 14

CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45
CodegenMethod · 0.45

Calls 2

CodegenHasDisableHintMethod · 0.80

Tested by

no test coverage detected