You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Weston Pace (Jira)" <ji...@apache.org> on 2022/06/10 20:42:00 UTC
[jira] [Resolved] (ARROW-16796) [C++] Fix bad defaulting of ExecContext argument
[ https://issues.apache.org/jira/browse/ARROW-16796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Weston Pace resolved ARROW-16796.
---------------------------------
Fix Version/s: 9.0.0
Resolution: Fixed
Issue resolved by pull request 13355
[https://github.com/apache/arrow/pull/13355]
> [C++] Fix bad defaulting of ExecContext argument
> ------------------------------------------------
>
> Key: ARROW-16796
> URL: https://issues.apache.org/jira/browse/ARROW-16796
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Reporter: Yaron Gvili
> Assignee: Yaron Gvili
> Priority: Major
> Labels: pull-request-available
> Fix For: 9.0.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> In several places in Arrow code, invocations of Expression::Bind() default the ExecContext argument. This leads to the default function registry being used in expression manipulations, and this becomes a problem when the user wishes to use a non-default function registry, e.g., when passing one to the ExecContext of an ExecPlan, which is how I discovered this issue. The problematic places I found for such Expression::Bind() invocation are:
> * cpp/src/arrow/dataset/file_parquet.cc
> * cpp/src/arrow/dataset/scanner.cc
> * cpp/src/arrow/compute/exec/project_node.cc
> * cpp/src/arrow/compute/exec/hash_join_node.cc
> * cpp/src/arrow/compute/exec/filter_node.cc
> There are also other places in test and benchmark code (grep for 'Bind()').
> Another case of bad defaulting of an ExecContext argument is in Inequality::simplifies_to in cpp/src/compute/exec/expression.cc where a fresh ExecContext is created, instead of being received from the caller, and passed to BindNonRecursive.
> I'd argue that an ExecContext variable should not be allowed to default, except perhaps in the highest-level/user-facing APIs.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)