Skip to content

GH-50595: [C++]Add VisitIntegerType helper - #50711

Open
VedantRalekar wants to merge 3 commits into
apache:mainfrom
VedantRalekar:issue-50595
Open

GH-50595: [C++]Add VisitIntegerType helper#50711
VedantRalekar wants to merge 3 commits into
apache:mainfrom
VedantRalekar:issue-50595

Conversation

@VedantRalekar

@VedantRalekar VedantRalekar commented Jul 29, 2026

Copy link
Copy Markdown

This PR introduces VisitIntegerType in arrow/util/visit_type_inline.h, providing a convenient way to dispatch integer-only Arrow types using the existing visitor pattern.

Changes :

  • Added VisitIntegerType based on ARROW_GENERATE_FOR_ALL_INTEGER_TYPES.
  • Reused the existing VisitType dispatch pattern for consistency.
  • Added support for all Arrow integer types (Int8/UInt8 through Int64/UInt64).
  • Added a failure path for non-integer inputs since the helper assumes an integer type.

This will allow code such as dictionary index handling to be simplified by replacing manual integer type switches with a reusable visitor helper.

@VedantRalekar
VedantRalekar requested a review from pitrou as a code owner July 29, 2026 13:33
@github-actions github-actions Bot added the awaiting review Awaiting review label Jul 29, 2026
@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 July 29, 2026 13:35
@VedantRalekar VedantRalekar changed the title Add VisitIntegerType helper for integer type dispatch GH-5095: [C++][UTIL] Add VisitIntegerType helper Jul 29, 2026
@VedantRalekar
VedantRalekar marked this pull request as ready for review July 29, 2026 13:48
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #5095 has no components, please add labels for components.

@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #5095 has no components, please add labels for components.

@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #5095 has no components, please add labels for components.

@VedantRalekar VedantRalekar changed the title GH-5095: [C++][UTIL] Add VisitIntegerType helper GH-50595: [C++][UTIL] Add VisitIntegerType helper Jul 29, 2026
@VedantRalekar VedantRalekar changed the title GH-50595: [C++][UTIL] Add VisitIntegerType helper GH-50595: [C++]Add VisitIntegerType helper Jul 30, 2026
@VedantRalekar VedantRalekar reopened this Jul 30, 2026
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