Commit 2e08d5c
authored
Improve dictionary null handling in hashing and expand aggregate test coverage for nulls (#16466)
- **Hashing Logic Enhancements:**
- Introduced a new helper function `update_hash_for_dict_key` to cleanly and correctly apply dictionary value hashes based on validity.
- Reworked the logic in `hash_dictionary` to use this helper, improving clarity and maintainability.
- **Test Coverage Improvements:**
- Renamed `aggregates.rs` to `aggregates/basic.rs` and introduced a new `aggregates/dict_nulls.rs` module.
- Added new test utilities and structured test data generators in `mod.rs` to support dictionary null testing.
- Comprehensive new test cases for:
- `COUNT`, `SUM`, `MIN`, `MAX`, `MEDIAN`, `FIRST_VALUE`, `LAST_VALUE` on dictionary columns with nulls.
- `RESPECT NULLS` / `IGNORE NULLS` options in window functions.
- Grouping by dictionary columns with null keys or values.
- Partitioned execution consistency using fuzzed data across multiple types (numeric, binary, decimal, timestamp).
- **Minor Fixes:**
- Corrected test message grammar (e.g., "should success to..." → "should succeed to...").
- Enabled `null_pct` support in dictionary value generation to better simulate real-world datasets.1 parent 4dd7825 commit 2e08d5c
File tree
6 files changed
+1521
-23
lines changed- datafusion
- common/src
- core/tests
- fuzz_cases
- aggregation_fuzzer
- sql/aggregates
6 files changed
+1521
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
187 | 207 | | |
188 | 208 | | |
189 | 209 | | |
| |||
195 | 215 | | |
196 | 216 | | |
197 | 217 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
215 | 235 | | |
216 | 236 | | |
217 | 237 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
| 727 | + | |
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
733 | | - | |
734 | | - | |
735 | | - | |
| 733 | + | |
736 | 734 | | |
737 | 735 | | |
738 | 736 | | |
| |||
File renamed without changes.
0 commit comments