Commit 2d80194
authored
Add Extension Type / Metadata support for Scalar UDFs (#15646)
* Add in plumbing to pass around metadata for physical expressions
* Adding argument metadata to scalar argument struct
* Since everywhere we use this we immediately clone, go ahead and returned an owned version of the metadata for simplicity
* Cargo fmt
* Benchmarks required args_metadata in tests
* Clippy warnings
* Switching over to passing Field around instead of metadata so we can handle extension types directly
* Switching return_type_from_args to return_field_from_args
* Updates to unit tests for switching to field instead of data_type
* Resolve unit test issues
* Update after rebase on main
* GetFieldFunc should return the field it finds instead of creating a new one
* Get metadata from scalar functions
* Change expr_schema to use to_field primarily instead of individual calls for getting data type, nullability, and schema
* Scalar function arguments should take return field instead of return data type now
* subquery should just get the field from below and not lose potential metadata
* Update comment
* Remove output_field now that we've determined it using return_field_from_args
* Change name to_field to field_from_column to be more consistent with the usage and prevent misconception about if we are doing some conversion
* Minor moving around of the explicit lifetimes in the struct definition
* Change physical expression to require to output a field which requires a lot of unit test updates, especially because the scalar arguments pass around borrowed values
* Change name from output_field to return_field to be more consistent
* Update migration guide for DF48 with user defined functions
* Whitespace
* Docstring correction1 parent e1ad767 commit 2d80194
95 files changed
Lines changed: 2102 additions & 1294 deletions
File tree
- datafusion
- common/src
- core
- tests
- physical_optimizer
- tpc-ds
- user_defined
- expr/src
- logical_plan
- ffi/src
- udf
- functions-nested/benches
- functions
- benches
- src
- core
- datetime
- math
- regex
- string
- unicode
- physical-expr-common/src
- physical-expr/src
- equivalence/properties
- expressions
- physical-plan/src
- aggregates
- proto
- src/physical_plan
- tests/cases
- docs/source/library-user-guide
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| |||
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | 518 | | |
527 | 519 | | |
528 | 520 | | |
| |||
969 | 961 | | |
970 | 962 | | |
971 | 963 | | |
972 | | - | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
973 | 967 | | |
974 | 968 | | |
975 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
976 | 972 | | |
977 | 973 | | |
978 | | - | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
979 | 977 | | |
980 | 978 | | |
981 | | - | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
982 | 986 | | |
983 | 987 | | |
984 | 988 | | |
| |||
998 | 1002 | | |
999 | 1003 | | |
1000 | 1004 | | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | 1005 | | |
1012 | | - | |
1013 | | - | |
| 1006 | + | |
| 1007 | + | |
1014 | 1008 | | |
| 1009 | + | |
1015 | 1010 | | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1019 | 1017 | | |
1020 | 1018 | | |
1021 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments