Right now it's an application-dependent decision. I think until we see more fully-formed query engines or other data processing applications that use this code, it's hard to say what will emerge as the best practice. For example, a mutable ExecContext* is passed to many functions, but it might be that we want to change many of these to be const ExecContext*.
On Thu, Dec 24, 2020 at 9:32 AM Niranda Perera <niranda.per...@gmail.com> wrote: > > Hi all, > > I have seen that arrow compute functions (c++) accepts an ExecContext for > each method. If I am using compute methods multiple times, is it a good > practice to use its default value (nullptr) or should I create an > ExecContext in the user code and pass it? > AFAIS default ExecContext doesn't seem to act as a singleton. > https://github.com/apache/arrow/blob/ea4a405e1e988746632150167b936f8b17557e44/cpp/src/arrow/compute/exec.cc#L921 > > -- > Niranda Perera > @n1r44 <https://twitter.com/N1R44> > +1 812 558 8884 / +94 71 554 8430 > https://www.linkedin.com/in/niranda