You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2020/07/09 17:46:00 UTC

[jira] [Updated] (ARROW-9389) [C++] Can't call isin/match through CallFunction

     [ https://issues.apache.org/jira/browse/ARROW-9389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Pitrou updated ARROW-9389:
----------------------------------
    Fix Version/s:     (was: 2.0.0)
                   1.0.0

> [C++] Can't call isin/match through CallFunction
> ------------------------------------------------
>
>                 Key: ARROW-9389
>                 URL: https://issues.apache.org/jira/browse/ARROW-9389
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Neal Richardson
>            Priority: Major
>              Labels: compute
>             Fix For: 1.0.0
>
>
> From R:
> {code:r}
> library(arrow)
> a <- Array$create(1:4)
> b <- Array$create(c(2L, 4L, 3L))
> arrow:::call_function("isin", a, b)
> {code}
> says that "isin" takes only 1 argument, not 2, which doesn't make sense. In C++ scalar_set_lookup.cc, I see {{auto isin = std::make_shared<ScalarFunction>("isin", Arity::Unary());}}, which is the source of that validation I guess, but the kernel in api_scalar.cc has signature {{Result<Datum> IsIn(const Datum& values, const Datum& value_set, ExecContext* ctx)}}.
> If I actually call "isin" with one argument, i.e. {{arrow:::call_function("isin", a)}}, it segfaults.
> Changing the definition to Arity::Binary(), it accepts 2 arguments, but it errors with {{NotImplemented: Function isin has no kernel matching input types (array[int32], array[int32])}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)