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

   ### Describe the enhancement requested
   
   You can currently compare a `Utf8View` column with another `Utf8View` 
column, and you can compare between `Utf8` and `LargeUtf8`, but you can't 
compare `Utf8View` with either `Utf8` or `LargeUtf8`.
   
   PyArrow reproducer:
   ```python
   import itertools
   
   import pyarrow as pa
   import pyarrow.compute as pc
   
   STRING_TYPES = {
       "string": pa.string(),
       "large_string": pa.large_string(),
       "string_view": pa.string_view(),
   }
   
   LEFT_VALUES = ["a", "b", None, "d"]
   RIGHT_VALUES = ["a", "x", "c", None]
   
   
   def main():
       for (left_name, left_type), (right_name, right_type) in 
itertools.product(
           STRING_TYPES.items(), repeat=2
       ):
           left = pa.array(LEFT_VALUES, type=left_type)
           right = pa.array(RIGHT_VALUES, type=right_type)
           label = f"{left_name} == {right_name}"
           try:
               result = pc.equal(left, right)
           except Exception as e:
               print(f"{label}: FAILED with {type(e).__name__}: {e}")
           else:
               print(f"{label}: OK -> {result.to_pylist()}")
   
   
   if __name__ == "__main__":
       main()
   ```
   
   With PyArrow 26.0.0 this outputs:
   ```
   string == string: OK -> [True, False, None, None]
   string == large_string: OK -> [True, False, None, None]
   string == string_view: FAILED with ArrowNotImplementedError: Function 
'equal' has no kernel matching input types (string, string_view)
   large_string == string: OK -> [True, False, None, None]
   large_string == large_string: OK -> [True, False, None, None]
   large_string == string_view: FAILED with ArrowNotImplementedError: Function 
'equal' has no kernel matching input types (large_string, string_view)
   string_view == string: FAILED with ArrowNotImplementedError: Function 
'equal' has no kernel matching input types (string_view, string)
   string_view == large_string: FAILED with ArrowNotImplementedError: Function 
'equal' has no kernel matching input types (string_view, large_string)
   string_view == string_view: OK -> [True, False, None, None]
   ```
   
   ### Component(s)
   
   C++


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to