Repository navigation
Commit 9f377c4
authored
fix: correct list field inner type in array functions (apache#24345)
## 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?
None1 parent 574fe67 commit 9f377c4
4 files changed
Lines changed: 97 additions & 9 deletions
File tree
- datafusion
- functions-nested/src
- sqllogictest/test_files
- array
- spark/array
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
622 | 621 | | |
623 | 622 | | |
624 | 623 | | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
625 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
626 | 639 | | |
627 | | - | |
| 640 | + | |
628 | 641 | | |
629 | 642 | | |
630 | 643 | | |
| |||
638 | 651 | | |
639 | 652 | | |
640 | 653 | | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
641 | 657 | | |
642 | | - | |
643 | | - | |
| 658 | + | |
644 | 659 | | |
645 | 660 | | |
646 | 661 | | |
| |||
682 | 697 | | |
683 | 698 | | |
684 | 699 | | |
685 | | - | |
| 700 | + | |
686 | 701 | | |
687 | 702 | | |
688 | 703 | | |
| |||
704 | 719 | | |
705 | 720 | | |
706 | 721 | | |
707 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
708 | 725 | | |
709 | 726 | | |
710 | 727 | | |
| 728 | + | |
711 | 729 | | |
712 | | - | |
| 730 | + | |
713 | 731 | | |
714 | 732 | | |
715 | 733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
321 | 354 | | |
322 | 355 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
453 | 484 | | |
454 | 485 | | |
455 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
0 commit comments