Replies: 1 comment
-
Sorry that this fell through the gaps. Did you manage to find a solution? Closing for now, will reopen upon hearing from you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am currently migrating from presto to trino, specifically, from presto 0.211 to trino 358.
One of the biggest parts of doing so is changing UDFs to be consistent with trino SPI.
Everything is fine, and most of the work has been done nicely, but except for one thing, which is related to this issue.
To begin with, I have several aggregation UDF functions, and some of them rely on parametric types, such that,
In the past, in order to get the instance of the custom AccumulatorStateSerializer, I had to use AggregationStateSerializerFactory annotation because it has to have some way to pass on parametric types, rather than being automatically generated by reflection.
As seen in the code below, MyStateSerializer relies on parametric types and is provided with them through its constructor.
The only way to call this constructor was through a function with AggregationStateSerializerFactory annotation that resides in the aggregation function class like the below.
However, AggregationStateSerializerFactory has been removed from the codebase as seen here, and as of now, I don't have any particularly good idea of passing parametric types, that are K and V in this example, to the constructor.
May I ask,
Is there any good way to solve this problem or any other workaround?
Or, is it possible to reintroduce AggregationStateSerializerFactory to the codebase?
Thank you. :)
Beta Was this translation helpful? Give feedback.
All reactions