Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-9389

[C++] Can't call isin/match through CallFunction

    XMLWordPrintableJSON

Details

    Description

      From R:

      library(arrow)
      a <- Array$create(1:4)
      b <- Array$create(c(2L, 4L, 3L))
      arrow:::call_function("isin", a, b)
      

      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])

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              npr Neal Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m