| 895 | } |
| 896 | |
| 897 | Status ExecuteNonSpans(ExecListener* listener) { |
| 898 | // ARROW-16756: Kernel is going to allocate some memory and so |
| 899 | // for the time being we pass in an empty or partially-filled |
| 900 | // shared_ptr<ArrayData> or shared_ptr<Scalar> to be populated |
| 901 | // by the kernel. |
| 902 | // |
| 903 | // We will eventually delete the Scalar output path per |
| 904 | // ARROW-16757. |
| 905 | ExecSpan input; |
| 906 | ExecResult output; |
| 907 | while (span_iterator_.Next(&input)) { |
| 908 | ARROW_ASSIGN_OR_RAISE(output.value, PrepareOutput(input.length)); |
| 909 | DCHECK(output.is_array_data()); |
| 910 | |
| 911 | ArrayData* out_arr = output.array_data().get(); |
| 912 | if (output_type_.type->id() == Type::NA) { |
| 913 | out_arr->null_count = out_arr->length; |
| 914 | } else if (kernel_->null_handling == NullHandling::INTERSECTION) { |
| 915 | RETURN_NOT_OK(PropagateNulls(kernel_ctx_, input, out_arr)); |
| 916 | } else if (kernel_->null_handling == NullHandling::OUTPUT_NOT_NULL) { |
| 917 | out_arr->null_count = 0; |
| 918 | } |
| 919 | |
| 920 | RETURN_NOT_OK(kernel_->exec(kernel_ctx_, input, &output)); |
| 921 | |
| 922 | // Output type didn't change |
| 923 | DCHECK(output.is_array_data()); |
| 924 | |
| 925 | // Emit a result for each chunk |
| 926 | RETURN_NOT_OK(EmitResult(output.array_data(), listener)); |
| 927 | } |
| 928 | return Status::OK(); |
| 929 | } |
| 930 | |
| 931 | Status SetupPreallocation(int64_t total_length, const std::vector<Datum>& args) { |
| 932 | output_num_buffers_ = static_cast<int>(output_type_.type->layout().buffers.size()); |
nothing calls this directly
no test coverage detected