cpp/src/arrow/dataset/expression.cc
// Produce a bound Expression from unbound Call and bound arguments.
Produce a bound Expression from unbound Call and bound arguments.
Produce a bound Expression from unbound Call and bound arguments .
Result<Expression> BindNonRecursive(const Expression::Call& call,
                                    std::vector<Expression> arguments,
                                    bool insert_implicit_casts,
                                    compute::ExecContext* exec_context) {
  DCHECK(std::all_of(arguments.begin(), arguments.end(),
                     [](const Expression& argument) { return argument.IsBound(); }));
  auto bound_call = call;
  bound_call.arguments = std::move(arguments);
  if (insert_implicit_casts) {
    RETURN_NOT_OK(InsertImplicitCasts(&bound_call));
  }
  ARROW_ASSIGN_OR_RAISE(bound_call.function, GetFunction(bound_call, exec_context));
  auto descrs = GetDescriptors(bound_call.arguments);
  ARROW_ASSIGN_OR_RAISE(bound_call.kernel, bound_call.function->DispatchExact(descrs));
  compute::KernelContext kernel_context(exec_context);
  ARROW_ASSIGN_OR_RAISE(bound_call.kernel_state,
                        InitKernelState(bound_call, exec_context));
  kernel_context.SetState(bound_call.kernel_state.get());
  ARROW_ASSIGN_OR_RAISE(
      bound_call.descr,
      bound_call.kernel->signature->out_type().Resolve(&kernel_context, descrs));
  return Expression(std::move(bound_call));
}
Result < Expression > BindNonRecursive ( const Expression :: Call & call , std :: vector < Expression > arguments , bool insert_implicit_casts , compute :: ExecContext * exec_context ) { DCHECK ( std :: all_of ( arguments . begin ( ) , arguments . end ( ) , [ ] ( const Expression & argument ) { return argument . IsBound ( ) ; } ) ) ; auto bound_call = call ; bound_call . arguments = std :: move ( arguments ) ; if ( insert_implicit_casts ) { RETURN_NOT_OK ( InsertImplicitCasts ( & bound_call ) ) ; } ARROW_ASSIGN_OR_RAISE ( bound_call . function , GetFunction ( bound_call , exec_context ) ) ; auto descrs = GetDescriptors ( bound_call . arguments ) ; ARROW_ASSIGN_OR_RAISE ( bound_call . kernel , bound_call . function -> DispatchExact ( descrs ) ) ; compute :: KernelContext kernel_context ( exec_context ) ; ARROW_ASSIGN_OR_RAISE ( bound_call . kernel_state , InitKernelState ( bound_call , exec_context ) ) ; kernel_context . SetState ( bound_call . kernel_state . get ( ) ) ; ARROW_ASSIGN_OR_RAISE ( bound_call . descr , bound_call . kernel -> signature -> out_type ( ) . Resolve ( & kernel_context , descrs ) ) ; return Expression ( std :: move ( bound_call ) ) ; }
Produce a bound Expression from unbound Call and bound arguments.
Produce a bound Expression from unbound Call and bound arguments .