presto icon indicating copy to clipboard operation
presto copied to clipboard

Add subfield pruning for lambda for user defined functions

Open rmarduga opened this issue 1 year ago • 3 comments

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 ==

rmarduga avatar Oct 07 '23 19:10 rmarduga

Codenotify: Notifying subscribers in CODENOTIFY files for diff 328cc32ce15ecac965a64e08968fc1c9b72ed8f9...9b724efb12174ae78a67b99c22663d290b45f6f3.

Notify File(s)
@steveburnett presto-docs/src/main/sphinx/develop/functions.rst

github-actions[bot] avatar Oct 12 '23 00:10 github-actions[bot]

Taking a deeper dive, Would be great if you could also update developer guide for functions - link

jaystarshot avatar Nov 08 '23 18:11 jaystarshot

Taking a deeper dive, Would be great if you could also update developer guide for functions - link

Added documentation.

rmarduga avatar Dec 25 '23 01:12 rmarduga