You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "MarcoGorelli (via GitHub)" <gi...@apache.org> on 2025/03/09 15:57:24 UTC

[I] Function 'binary_join_element_wise' has no kernel matching input types (large_string, large_string, string) [arrow]

MarcoGorelli opened a new issue, #45717:
URL: https://github.com/apache/arrow/issues/45717

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   ```python
   import pyarrow as pa
   import pyarrow.compute as pc
   a1 = pa.array(['x', 'y'], type=pa.string())
   a2 = pa.array(['x', 'y'], type=pa.large_string())
   ```
   Then:
   ```python
   In [19]: pc.binary_join_element_wise(a1, '')
   Out[19]:
   <pyarrow.lib.StringArray object at 0x7f6589dcb280>
   [
     "x",
     "y"
   ]
   ```
   All good
   
   Using `a2`:
   ```python
   In [20]: pc.binary_join_element_wise(a2, '')
   ---------------------------------------------------------------------------
   ArrowNotImplementedError                  Traceback (most recent call last)
   Cell In[20], line 1
   ----> 1 pc.binary_join_element_wise(a2, '')
   
   File ~/polars-api-compat-dev/.venv/lib/python3.12/site-packages/pyarrow/compute.py:264, in _make_generic_wrapper.<locals>.wrapper(memory_pool, options, *args, **kwargs)
       262 if args and isinstance(args[0], Expression):
       263     return Expression._call(func_name, list(args), options)
   --> 264 return func.call(args, options, memory_pool)
   
   File ~/polars-api-compat-dev/.venv/lib/python3.12/site-packages/pyarrow/_compute.pyx:393, in pyarrow._compute.Function.call()
   
   File ~/polars-api-compat-dev/.venv/lib/python3.12/site-packages/pyarrow/error.pxi:155, in pyarrow.lib.pyarrow_internal_check_status()
   
   File ~/polars-api-compat-dev/.venv/lib/python3.12/site-packages/pyarrow/error.pxi:92, in pyarrow.lib.check_status()
   
   ArrowNotImplementedError: Function 'binary_join_element_wise' has no kernel matching input types (large_string, string)
   ```
   
   Expected;
   ```
   In [20]: pc.binary_join_element_wise(a2, '')
   Out [20]:
   <pyarrow.lib.LargeStringArray object at 0x7f6589dcb280>
   [
     "x",
     "y"
   ]
   ```
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Function 'binary_join_element_wise' has no kernel matching input types (large_string, string) [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on issue #45717:
URL: https://github.com/apache/arrow/issues/45717#issuecomment-2710642186

   I think the method expects all strings to be of the same type:
   
   ```python
   In [11]: pc.binary_join_element_wise(a2, pa.scalar('', type=pa.large_string()))
   Out[11]: 
   <pyarrow.lib.LargeStringArray object at 0x10ee872e0>
   [
     "x",
     "y"
   ]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Python] Function 'binary_join_element_wise' has no kernel matching input types (large_string, string) [arrow]

Posted by "MarcoGorelli (via GitHub)" <gi...@apache.org>.
MarcoGorelli commented on issue #45717:
URL: https://github.com/apache/arrow/issues/45717#issuecomment-2710700537

   yup, thanks!
   
   If a user passes a Python string literal to `separator`, shouldn't that get auto-cast to the appropriate PyArrow string type?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Python] Function 'binary_join_element_wise' has no kernel matching input types (large_string, string) [arrow]

Posted by "AlenkaF (via GitHub)" <gi...@apache.org>.
AlenkaF commented on issue #45717:
URL: https://github.com/apache/arrow/issues/45717#issuecomment-2710817699

   Yeah, it gets casted to the default `pa.string()`. @pitrou would it make sense to check for string input type in Python before calling `binary_join_element_wise` in case a `large_string` type is present?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Python] Function 'binary_join_element_wise' has no kernel matching input types (large_string, string) [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #45717:
URL: https://github.com/apache/arrow/issues/45717#issuecomment-2710974385

   > [@pitrou](https://github.com/pitrou) would it make sense to check for string input type in Python before calling `binary_join_element_wise` in case a `large_string` type is present?
   
   I don't think so. The Python compute function wrappers are auto-generated from the C++ description.
   However, it may make sense to improve `binary_join_element_wise` so as to accept mixed narrow+large inputs, in case it doesn't generate too much additional code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++][Python] Function 'binary_join_element_wise' has no kernel matching input types (large_string, string) [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #45717:
URL: https://github.com/apache/arrow/issues/45717#issuecomment-4525191022

   This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org