Skip to content

chore: rows_to_array cleanup for expecting single field - #24040

Merged
neilconway merged 1 commit into
apache:mainfrom
saadtajwar:saadtajwar/rowsgroupcolumn-rows-to-array-extraction-fix
Aug 1, 2026
Merged

chore: rows_to_array cleanup for expecting single field#24040
neilconway merged 1 commit into
apache:mainfrom
saadtajwar:saadtajwar/rowsgroupcolumn-rows-to-array-extraction-fix

Conversation

@saadtajwar

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Making the rows_to_array method inRowsGroupColumn behavior of expecting a singular field explicit, as before it used a generic vector operation of swap_remove(0) and a debug_assert_eq! for ensuring that there was only a single field extracted

What changes are included in this PR?

Changed the debug_assert_eq! to the non-debug macro with a clear error message & changing the swap_remove(0) to a pop with unwrap now that we are guaranteeing the invariant

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Aug 1, 2026
@saadtajwar
saadtajwar marked this pull request as ready for review August 1, 2026 01:52
@saadtajwar

Copy link
Copy Markdown
Contributor Author

@kosiew ready for review! 😄

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 80.85%. Comparing base (f2b4835) to head (aea4c51).

Files with missing lines Patch % Lines
...gregates/group_values/multi_group_by/row_backed.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24040      +/-   ##
==========================================
- Coverage   80.85%   80.85%   -0.01%     
==========================================
  Files        1101     1101              
  Lines      375467   375469       +2     
  Branches   375467   375469       +2     
==========================================
- Hits       303596   303585      -11     
- Misses      53777    53786       +9     
- Partials    18094    18098       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@neilconway neilconway left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: the PR prefix should be "chore", not "fix" (which is for bugfixes).

Otherwise lgtm!

assert_eq!(
arrays.len(),
1,
"Single field row converter must produce exactly one array, actual length is {}",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: when the assert fails, it will already print the values, so "actual length is ..." is redundant.

@neilconway
neilconway added this pull request to the merge queue Aug 1, 2026
Merged via the queue into apache:main with commit b902256 Aug 1, 2026
40 checks passed
@saadtajwar saadtajwar changed the title fix: rows_to_array cleanup for expecting single field chore: rows_to_array cleanup for expecting single field Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make RowsGroupColumn single-field extraction explicit

3 participants