Commit 99bc960
Add missing array functions (apache#1468)
* Add missing array/list functions and aliases (apache#1452)
Add new array functions from upstream DataFusion v53: array_any_value,
array_distance, array_max, array_min, array_reverse, arrays_zip,
string_to_array, and gen_series. Add corresponding list_* aliases and
missing list_* aliases for existing functions (list_empty, list_pop_back,
list_pop_front, list_has, list_has_all, list_has_any). Also add
array_contains/list_contains as aliases for array_has, generate_series
as alias for gen_series, and string_to_list as alias for string_to_array.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add unit tests for new array/list functions and aliases
Tests cover all functions and aliases added in the previous commit:
array_any_value, array_distance, array_max, array_min, array_reverse,
arrays_zip, string_to_array, gen_series, generate_series,
array_contains, list_contains, list_empty, list_pop_back,
list_pop_front, list_has, list_has_all, list_has_any, and list_*
aliases for the new functions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Improve array function APIs: optional params, better naming, restore comment
- Make null_string optional in string_to_array/string_to_list
- Make step optional in gen_series/generate_series
- Rename second_array to element in array_contains/list_has/list_contains
- Restore # Window Functions section comment in __all__
- Add tests for optional parameter variants
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Consolidate array/list function tests using pytest parametrize
Reduce 26 individual tests to 14 test functions with parametrized
cases, eliminating boilerplate while maintaining full coverage.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Move list alias tests into existing test_array_functions parametrize block
Merge standalone tests for list_empty, list_pop_back, list_pop_front,
list_has, array_contains, list_contains, list_has_all, and list_has_any
into the existing parametrized test_array_functions block alongside
their array_* counterparts.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Merge test_array_any_value into parametrized test_any_value_aliases
Use the richer multi-row dataset (including all-nulls case) for both
array_any_value and list_any_value via the parametrized test.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add arrays_overlap and list_overlap as aliases for array_has_any
These aliases match the upstream DataFusion SQL-level aliases, completing
the set of missing array functions from issue apache#1452.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add docstring examples for optional params in string_to_array and gen_series
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Update AGENTS file to demonstrate preferred method of documenting python functions
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ff15648 commit 99bc960
File tree
4 files changed
+547
-0
lines changed- crates/core/src
- python
- datafusion
- tests
4 files changed
+547
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
96 | 140 | | |
97 | 141 | | |
98 | 142 | | |
| |||
681 | 725 | | |
682 | 726 | | |
683 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
684 | 732 | | |
685 | 733 | | |
686 | 734 | | |
| |||
1152 | 1200 | | |
1153 | 1201 | | |
1154 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
1155 | 1211 | | |
1156 | 1212 | | |
1157 | 1213 | | |
| |||
0 commit comments