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

Function SimpleBinary

cpp/src/arrow/compute/kernels/codegen_internal.h:587–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585// ExecResult* out)
586template <typename Operator>
587Status SimpleBinary(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
588 if (batch.length == 0) return Status::OK();
589
590 if (batch[0].is_array()) {
591 if (batch[1].is_array()) {
592 return Operator::Call(ctx, batch[0].array, batch[1].array, out);
593 } else {
594 return Operator::Call(ctx, batch[0].array, *batch[1].scalar, out);
595 }
596 } else {
597 if (batch[1].is_array()) {
598 return Operator::Call(ctx, *batch[0].scalar, batch[1].array, out);
599 } else {
600 ARROW_DCHECK(false);
601 return Status::Invalid("Should be unreachable");
602 }
603 }
604}
605
606// OutputAdapter allows passing an inlineable lambda that provides a sequence
607// of output values to write into output memory. Boolean and primitive outputs

Callers

nothing calls this directly

Calls 4

CallClass · 0.85
is_arrayMethod · 0.80
OKFunction · 0.50
InvalidFunction · 0.50

Tested by

no test coverage detected