Skip to content

GH-50995: [C++][Compute] Support mixed StringView and BinaryView comparison - #50977

Open
Jay846 wants to merge 3 commits into
apache:mainfrom
Jay846:feature/string-view-comparison
Open

GH-50995: [C++][Compute] Support mixed StringView and BinaryView comparison#50977
Jay846 wants to merge 3 commits into
apache:mainfrom
Jay846:feature/string-view-comparison

Conversation

@Jay846

@Jay846 Jay846 commented Aug 24, 2026

Copy link
Copy Markdown

Rationale for this change

This PR adds comprehensive cross-type comparison support for StringView and BinaryView types against standard offset-based string/binary layout containers across all 6 core comparison operators.

What changes are included in this PR?

  • Universal Operator Dispatches: Extended internal dispatches in codegen_internal.cc to map mixed string configurations cleanly across all six relational operators (equal, not_equal, greater, greater_equal, less, less_equal).
  • Offset Bounds Safety: Configured view parsing parameters to cleanly unpack both inline arrays and out-of-line data buffers handling boundaries exceeding the 12-byte baseline optimization limit.

Are these changes tested?

Yes, added dedicated hierarchical test suites inside scalar_compare_test.cc verifying:

  • MixedTypesNullPropagation: Confirms valid null mapping across disjoint array inputs.
  • MixedTypesAllOperators: Programmatic testing matrix validating all relational operators.
  • MixedTypesBoundaryAndSlices: Ensures non-zero pointer slices evaluate without indexing out-of-bound errors.

@Jay846
Jay846 requested a review from pitrou as a code owner August 24, 2026 21:25
@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format.

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

After updating the title, you can mark the pull request as ready for review.

See also:

@github-actions
github-actions Bot marked this pull request as draft August 24, 2026 21:25
@Jay846 Jay846 changed the title Feature/string view comparison GH-50995: [C++][Compute] Support mixed StringView and BinaryView comparison Aug 25, 2026
@Jay846
Jay846 marked this pull request as ready for review August 25, 2026 16:08
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50995 has been automatically assigned in GitHub to PR creator.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant