Commit 129c9f7
committed
refactor: Consolidate struct casting logic into nested_struct module
Remove duplicate struct_cast.rs module and use the existing
nested_struct::cast_struct_column implementation instead. This
eliminates code duplication and provides a single source of truth
for struct field-by-name casting logic.
Changes:
- Add public cast_struct_array_by_name wrapper in nested_struct.rs
- Update columnar_value.rs to use nested_struct::cast_struct_array_by_name
- Update scalar/mod.rs to use nested_struct::cast_struct_array_by_name
- Remove struct_cast module from lib.rs
- Delete datafusion/common/src/struct_cast.rs
Benefits:
- Single implementation to maintain and test
- Consistent behavior across all struct casting operations
- Reduced maintenance burden for future bug fixes
- Better code cohesion in nested_struct module1 parent 67d2659 commit 129c9f7
File tree
5 files changed
+28
-130
lines changed- datafusion
- common/src
- scalar
- expr-common/src
5 files changed
+28
-130
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
168 | 194 | | |
169 | 195 | | |
170 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3708 | 3708 | | |
3709 | 3709 | | |
3710 | 3710 | | |
3711 | | - | |
| 3711 | + | |
3712 | 3712 | | |
3713 | 3713 | | |
3714 | 3714 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
0 commit comments