MCPcopy Create free account
hub / github.com/apache/arrow / PromoteExecSpanScalars

Function PromoteExecSpanScalars

cpp/src/arrow/compute/exec.cc:319–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317namespace {
318
319void PromoteExecSpanScalars(ExecSpan* span) {
320 // In the "all scalar" case, we "promote" the scalars to ArraySpans of
321 // length 1, since the kernel implementations do not handle the all
322 // scalar case
323 for (int i = 0; i < span->num_values(); ++i) {
324 ExecValue* value = &span->values[i];
325 if (value->is_scalar()) {
326 value->array.FillFromScalar(*value->scalar);
327 value->scalar = nullptr;
328 }
329 }
330}
331
332bool CheckIfAllScalar(const ExecBatch& batch) {
333 for (const Datum& value : batch.values) {

Callers 2

NextMethod · 0.85
ExecuteMethod · 0.85

Calls 3

is_scalarMethod · 0.80
FillFromScalarMethod · 0.80
num_valuesMethod · 0.45

Tested by

no test coverage detected