Commit 332f035
fix: string_to_array('', delim) now returns empty array for PostgreSQL compatibility
Rust's str::split() on an empty string yields one empty-string element,
causing string_to_array('', ',') to return [''] instead of the correct
empty array []. Added an is_empty() guard in both the plain and
null_value variants of string_to_array_impl, and added a sqllogictest
case to cover this edge case.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 15bc6bd commit 332f035
2 files changed
Lines changed: 28 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
749 | 754 | | |
750 | 755 | | |
751 | 756 | | |
| |||
773 | 778 | | |
774 | 779 | | |
775 | 780 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
784 | 794 | | |
785 | 795 | | |
786 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8623 | 8623 | | |
8624 | 8624 | | |
8625 | 8625 | | |
| 8626 | + | |
| 8627 | + | |
| 8628 | + | |
| 8629 | + | |
| 8630 | + | |
| 8631 | + | |
8626 | 8632 | | |
8627 | 8633 | | |
8628 | 8634 | | |
| |||
0 commit comments