kosiew opened a new pull request, #23859:
URL: https://github.com/apache/datafusion/pull/23859

   ### Which issue does this PR close?
   
   * Part of #22986
   
   ### Rationale for this change
   
   `map()` had separate decomposition and null-row filtering paths for 
`List`/`LargeList` and `FixedSizeList`, 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 `ListArrayRepresentation` adapter to provide a common 
row-oriented interface for `List`, `LargeList`, and `FixedSizeList`.
   * 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 
`MapArray` outputs.
   * Add cross-representation tests verifying equivalent behavior for:
   
     * null rows interleaved with non-null rows,
     * sliced inputs containing null rows,
     * all-null outer rows.
   * 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_representations`
   * `test_make_map_sliced_null_rows_are_equivalent_across_list_representations`
   * `test_make_map_all_null_rows_are_equivalent_across_list_representations`
   
   These complement the existing map tests by asserting equivalent behavior for 
`List`, `LargeList`, and `FixedSizeList` representations 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to