Unify map() list-row handling across list representations#23859
Open
kosiew wants to merge 3 commits into
Open
Conversation
- Separate list representation from borrowed arrays - Reuse key-derived representation for keys and values - Clarify private names and comments - Deduplicate test representation matrix - Leave boxed iterator and semantic-risk items unchanged
- Added tests for List, LargeList, and FixedSizeList. - Utilized non-zero outer slice offsets. - Covered internal null key row and hidden value row. - Reused assertions for full offsets, nulls, and children. - No changes made to production code.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23859 +/- ##
========================================
Coverage 80.70% 80.71%
========================================
Files 1090 1090
Lines 370150 370371 +221
Branches 370150 370371 +221
========================================
+ Hits 298746 298960 +214
+ Misses 53598 53596 -2
- Partials 17806 17815 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kosiew
marked this pull request as ready for review
July 24, 2026 12:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
map()had separate decomposition and null-row filtering paths forList/LargeListandFixedSizeList, resulting in duplicated logic and making it harder to verify equivalent behavior across supported outer list representations.This change introduces shared cross-representation tests and consolidates the internal row access and decomposition logic behind a single private adapter while preserving existing behavior and error handling.
What changes are included in this PR?
Introduce a private
ListArrayRepresentationadapter to provide a common row-oriented interface forList,LargeList, andFixedSizeList.Route map decomposition through the shared adapter instead of maintaining separate constructor paths for variable-sized and fixed-size lists.
Reuse the same key-driven null-row filtering logic for both key and value rows.
Route key validation through the shared row adapter.
Remove duplicated helper functions and the dedicated fixed-size list construction path that are superseded by the unified implementation.
Add reusable test fixtures and assertions for validating complete
MapArrayoutputs.Add cross-representation tests verifying equivalent behavior for:
Verify map offsets, outer validity bitmap, and child key/value arrays are identical across supported list representations.
Are these changes tested?
Yes.
The following tests were added:
test_make_map_null_rows_are_equivalent_across_list_representationstest_make_map_sliced_null_rows_are_equivalent_across_list_representationstest_make_map_all_null_rows_are_equivalent_across_list_representationsThese complement the existing map tests by asserting equivalent behavior for
List,LargeList, andFixedSizeListrepresentations without changing expected outputs.Are there any user-facing changes?
No. This is an internal refactoring and test expansion intended to preserve existing behavior and error messages while reducing duplicated implementation code.
LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed.