Skip to content

GH-46835: [C++] Add more configuration options to arrow::EqualOptions#47204

Merged
kou merged 5 commits intoapache:mainfrom
andishgar:enable_schema_and_meta_data_options
Sep 2, 2025
Merged

GH-46835: [C++] Add more configuration options to arrow::EqualOptions#47204
kou merged 5 commits intoapache:mainfrom
andishgar:enable_schema_and_meta_data_options

Conversation

@andishgar
Copy link
Copy Markdown
Contributor

@andishgar andishgar commented Jul 27, 2025

Rationale for this change

Parameterizing the comparison of metadata and arrow::Schema via arrow::EqualOptions.

What changes are included in this PR?

  • Added two attributes to arrow::EqualOptions for parameterizing the comparison of metadata and schema.

Are these changes tested?

Yes, I ran the relevant unit tests.

Are there any user-facing changes?

@github-actions
Copy link
Copy Markdown

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

@andishgar andishgar marked this pull request as draft July 27, 2025 10:16
@andishgar andishgar force-pushed the enable_schema_and_meta_data_options branch 2 times, most recently from e5dfb9b to 098be5d Compare July 27, 2025 11:40
@andishgar andishgar marked this pull request as ready for review July 27, 2025 12:36
@kou kou changed the title GH-46835 :[C++] Add more configuration options to arrow::EqualOptions GH-46835: [C++] Add more configuration options to arrow::EqualOptions Jul 27, 2025
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 28, 2025
@andishgar andishgar force-pushed the enable_schema_and_meta_data_options branch from 098be5d to b5ab8ab Compare July 28, 2025 08:57
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 28, 2025
@andishgar andishgar requested a review from kou July 28, 2025 09:56
@andishgar
Copy link
Copy Markdown
Contributor Author

Dear @kou , could you review it?

@kou kou requested a review from Copilot August 29, 2025 21:34
@kou
Copy link
Copy Markdown
Member

kou commented Aug 29, 2025

@github-actions crossbow submit preview-docs

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds more configuration options to arrow::EqualOptions to parameterize the comparison of metadata and schema in record batch equality checks. The changes allow users to control whether schema and metadata are considered during equality comparisons.

  • Adds use_schema() and use_metadata() configuration methods to EqualOptions
  • Introduces a new overload for RecordBatch::Equals that only takes another RecordBatch and EqualOptions
  • Refactors existing equality comparison methods to use the new options

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
cpp/src/arrow/compare.h Adds use_schema_ and use_metadata_ fields with corresponding getter/setter methods to EqualOptions
cpp/src/arrow/record_batch.h Adds new Equals overload and updates ApproxEquals to be inline with simplified implementation
cpp/src/arrow/record_batch.cc Consolidates equality logic into single method that respects new schema/metadata options
cpp/src/arrow/record_batch_test.cc Updates tests to use new API and adds comprehensive test coverage for new options

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Copy Markdown

Revision: b5ab8ab6841d9977394bab82ece6dcabee73d234

Submitted crossbow builds: ursacomputing/crossbow @ actions-f0c3a4f46f

Task Status
preview-docs GitHub Actions

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Aug 29, 2025
@andishgar
Copy link
Copy Markdown
Contributor Author

Thank you for your feedback. I will look into it.

@andishgar andishgar force-pushed the enable_schema_and_meta_data_options branch from b5ab8ab to d2253c8 Compare August 31, 2025 11:20
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Aug 31, 2025
@andishgar andishgar marked this pull request as draft August 31, 2025 15:09
@andishgar andishgar requested a review from kou August 31, 2025 16:14
@andishgar andishgar marked this pull request as draft September 1, 2025 10:53
@andishgar andishgar requested a review from kou September 1, 2025 17:45
@andishgar andishgar marked this pull request as ready for review September 1, 2025 17:45
correct naming
correct documentation comment
add compare.h document comment  on utilities.rst
@andishgar andishgar force-pushed the enable_schema_and_meta_data_options branch from 774190e to 22a3544 Compare September 1, 2025 18:08
@kou
Copy link
Copy Markdown
Member

kou commented Sep 2, 2025

@github-actions crossbow submit preview-docs

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 2, 2025

Revision: 22a3544

Submitted crossbow builds: ursacomputing/crossbow @ actions-213c549c83

Task Status
preview-docs GitHub Actions

@kou
Copy link
Copy Markdown
Member

kou commented Sep 2, 2025

@github-actions crossbow submit preview-docs

@kou
Copy link
Copy Markdown
Member

kou commented Sep 2, 2025

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Sep 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 2, 2025

Revision: c876f0c

Submitted crossbow builds: ursacomputing/crossbow @ actions-4c8f212ecc

Task Status
preview-docs GitHub Actions

@kou
Copy link
Copy Markdown
Member

kou commented Sep 2, 2025

@github-actions crossbow submit preview-docs

@github-actions github-actions bot added awaiting change review Awaiting change review awaiting changes Awaiting changes and removed awaiting changes Awaiting changes awaiting change review Awaiting change review labels Sep 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 2, 2025

Revision: 97aedd6

Submitted crossbow builds: ursacomputing/crossbow @ actions-dd2ad05b92

Task Status
preview-docs GitHub Actions

Copy link
Copy Markdown
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit 084a365 into apache:main Sep 2, 2025
33 of 42 checks passed
@kou kou removed the awaiting changes Awaiting changes label Sep 2, 2025
@github-actions github-actions bot added the awaiting merge Awaiting merge label Sep 2, 2025
@andishgar andishgar deleted the enable_schema_and_meta_data_options branch September 2, 2025 08:43
@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 084a365.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants