[ 
https://issues.apache.org/jira/browse/CASSANDRA-9613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369341#comment-15369341
 ] 

Robert Stupp commented on CASSANDRA-9613:
-----------------------------------------

Yes, there's no built-in function that is actually usable as a state or final 
function.
The contract for all functions (built-ins and UDFs) is still to pass serialized 
arguments (deserialization is part of the code in {{JavaSourceUDF.txt}} and the 
respective scripted UDF impl). This patch is only an optimization for the state 
variable since that is probably of a type that has a higher serialisation cost 
(e.g. map, tuple, udt). But it would be a generally affordable optimization to 
let built-in and especially UDFs take the non-serialized representation - 
thinking of "constant" arguments to UDFs. But at the moment we don't have the 
case where we pass "constant" arguments to UDFs (state functions especially).

Added comments to {{generateArguments}} and the new utest and triggered CI.

> Omit (de)serialization of state variable in UDAs
> ------------------------------------------------
>
>                 Key: CASSANDRA-9613
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9613
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>             Fix For: 3.x
>
>
> Currently the result of each UDA's state function call is serialized and then 
> deserialized for the next state-function invocation and optionally final 
> function invocation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to