You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "David Li (Jira)" <ji...@apache.org> on 2022/07/13 17:08:00 UTC
[jira] [Resolved] (ARROW-11341) [Python] [Gandiva] Check parameters are not None
[ https://issues.apache.org/jira/browse/ARROW-11341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Li resolved ARROW-11341.
------------------------------
Fix Version/s: 9.0.0
Resolution: Fixed
Issue resolved by pull request 9289
[https://github.com/apache/arrow/pull/9289]
> [Python] [Gandiva] Check parameters are not None
> ------------------------------------------------
>
> Key: ARROW-11341
> URL: https://issues.apache.org/jira/browse/ARROW-11341
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++ - Gandiva, Python
> Reporter: Will Jones
> Assignee: Will Jones
> Priority: Minor
> Labels: pull-request-available
> Fix For: 9.0.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> Most of the functions in Gandiva's Python Expression builder interface current accept None in their arguments, but will segfault once they are used.
> Example:
> {code:python}
> import pyarrow
> import pyarrow.gandiva as gandiva
> builder = gandiva.TreeExprBuilder()
> field = pyarrow.field('whatever', type=pyarrow.date64())
> date_col = builder.make_field(field)
> func = builder.make_function('less_than_or_equal_to', [date_col, None], pyarrow.bool_())
> condition = builder.make_condition(func)
> # Will segfault on this line:
> gandiva.make_filter(pyarrow.schema([field]), condition)
> {code}
> I think this is just a matter of adding {{not None}} to the appropriate function arguments.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)