presto
presto copied to clipboard
Add subfield pruning for lambda for user defined functions
Description
This PR adds necessary annotations for user defined functions so that it is now possible to define corresponding properties of ComplexTypeFuncitionDescriptor
and create it during the generation of SqlFunction
interface implementation in runtime.
See also #17535
Motivation and Context
In #19013, general support for pruning lambda subfields was added. However, it lacked the support for user defined functions that do not implement SqlFunction
interface directly. It they are defined as an annotated class that later gets parsed and SqlFunction
interface implementation is created during runtime.
Impact
Whew pushdown_subfields_from_lambda_enabled = true
, additional information about the struct subfield from lambdas is provided to the optimizer so that it can omit reading unnecessary struct subfields and thus generates more effective logical plan.
Test Plan
Unit tests.
== NO RELEASE NOTE ==
Codenotify: Notifying subscribers in CODENOTIFY files for diff 328cc32ce15ecac965a64e08968fc1c9b72ed8f9...9b724efb12174ae78a67b99c22663d290b45f6f3.
Notify | File(s) |
---|---|
@steveburnett | presto-docs/src/main/sphinx/develop/functions.rst |
Taking a deeper dive, Would be great if you could also update developer guide for functions - link
Taking a deeper dive, Would be great if you could also update developer guide for functions - link
Added documentation.