Commit 0b6ea95
Add missing conditional functions (#1464)
* Add missing conditional functions: greatest, least, nvl2, ifnull (#1449)
Expose four conditional functions from upstream DataFusion that were
not yet available in the Python bindings.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add unit tests for greatest, least, nvl2, and ifnull functions
Tests cover multiple data types (integers, strings), null handling
(all-null, partial-null), multiple arguments, and ifnull/nvl equivalence.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Use standard alias docstring pattern for ifnull
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* remove unused df fixture and fix parameter shadowing
* Refactor conditional function tests into parametrized test suite
Replace separate test functions for coalesce, greatest, least, nvl,
nvl2, ifnull with a single parametrized test using a shared fixture.
Adds coverage for nvl, nullif (previously untested), datetime and
boolean types, literal fallbacks, and variadic calls.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 645d261 commit 0b6ea95
File tree
3 files changed
+319
-49
lines changed- crates/core/src
- python
- datafusion
- tests
3 files changed
+319
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
| |||
548 | 550 | | |
549 | 551 | | |
550 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
551 | 558 | | |
552 | 559 | | |
553 | 560 | | |
| |||
989 | 996 | | |
990 | 997 | | |
991 | 998 | | |
| 999 | + | |
992 | 1000 | | |
993 | 1001 | | |
994 | 1002 | | |
995 | 1003 | | |
996 | 1004 | | |
997 | 1005 | | |
998 | 1006 | | |
| 1007 | + | |
999 | 1008 | | |
1000 | 1009 | | |
1001 | 1010 | | |
| |||
1013 | 1022 | | |
1014 | 1023 | | |
1015 | 1024 | | |
| 1025 | + | |
1016 | 1026 | | |
1017 | 1027 | | |
1018 | 1028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
155 | 157 | | |
156 | 158 | | |
157 | 159 | | |
| |||
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
216 | 219 | | |
217 | 220 | | |
218 | 221 | | |
| 222 | + | |
219 | 223 | | |
220 | 224 | | |
221 | 225 | | |
| |||
1045 | 1049 | | |
1046 | 1050 | | |
1047 | 1051 | | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1048 | 1080 | | |
1049 | 1081 | | |
1050 | 1082 | | |
| |||
1098 | 1130 | | |
1099 | 1131 | | |
1100 | 1132 | | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1101 | 1152 | | |
1102 | 1153 | | |
1103 | 1154 | | |
| |||
1282 | 1333 | | |
1283 | 1334 | | |
1284 | 1335 | | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
1285 | 1354 | | |
1286 | 1355 | | |
1287 | 1356 | | |
| |||
0 commit comments