You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by Niranda Perera <ni...@gmail.com> on 2020/12/24 15:32:01 UTC

arrow::compute::ExecContext default

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

Re: arrow::compute::ExecContext default

Posted by Wes McKinney <we...@gmail.com>.
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 <ni...@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