Skip to content

[C++] Implement equality comparison between Utf8View and other string types #54668

Open

Description

@adamreeve

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:

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++

Activity

  1. changed the title [-][++] Implement equality comparison between Utf8View and other string types[/-] [+][C++][++] Implement equality comparison between Utf8View and other string types[/+] on Oct 19, 2026
  2. changed the title [-][C++][++] Implement equality comparison between Utf8View and other string types[/-] [+][C++] Implement equality comparison between Utf8View and other string types[/+] on Oct 19, 2026
  3. goel-skd commented on Oct 23, 2026

    @goel-skd
    Contributor

    @adamreeve - Are you working on this? If not, happy to take it.

  4. added 4 commits that reference this issue on Oct 25, 2026
  5. adamreeve commented on Oct 26, 2026

    @adamreeve
    ContributorAuthor

    Hi @goel-skd, thanks for the offer. I'm not working on this but @Awesome06 now has a PR open for this. @Awesome06 can you please comment on this issue so you can be assigned?

  6. Awesome06 commented on Oct 27, 2026

    @Awesome06

    Yes
    I have submitted the PR for the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions