Skip to content

[branch-55] fix: correct list field inner type in array functions (#24345) - #24367

Merged
timsaucer merged 1 commit into
apache:branch-55from
timsaucer:fix/backport-24345
Aug 14, 2026
Merged

[branch-55] fix: correct list field inner type in array functions (#24345)#24367
timsaucer merged 1 commit into
apache:branch-55from
timsaucer:fix/backport-24345

Conversation

@timsaucer

Copy link
Copy Markdown
Member

This is a backport of #24345 for the release 55.0.0.

## Which issue does this PR close?

- Closes apache#24341

## Rationale for this change

There is a regression from 54.1.0 to 55.0.0rc2 where the spark function
`slice` can fail as demonstrated in the updated unit test, and as
described in the connected issue.

## What changes are included in this PR?

In the nested functions, get the inner field directly from the input for
array slicing operations. Also, since it is possible the inner list
could be non-nullable emit an empty slice instead of a null child
element for the outer lists's nulls.

## Are these changes tested?

Added 6 new tests in the SLT suite.

## Are there any user-facing changes?

None
@github-actions github-actions Bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Aug 14, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.14%. Comparing base (83d3489) to head (5aa5675).
⚠️ Report is 1 commits behind head on branch-55.

Files with missing lines Patch % Lines
datafusion/functions-nested/src/extract.rs 66.66% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           branch-55   #24367      +/-   ##
=============================================
- Coverage      81.14%   81.14%   -0.01%     
=============================================
  Files           1110     1110              
  Lines         386132   386135       +3     
  Branches      386132   386135       +3     
=============================================
- Hits          313325   313323       -2     
- Misses         54340    54343       +3     
- Partials       18467    18469       +2     

☔ 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.

@timsaucer
timsaucer merged commit 85406f3 into apache:branch-55 Aug 14, 2026
34 checks passed
@timsaucer
timsaucer deleted the fix/backport-24345 branch August 14, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants