Re: About UDF/UDA

2018-09-27 Thread DuyHai Doan
I'm afraid you cannot have a proper tabular formatting or an expand to multiple rows (which changes significantly the semantics) Indeed the result of the final func is returned by CQL as a whole column and currently there is no way to change the output formatting On Thu, Sep 27, 2018 at 6:55 AM,

Re: About UDF/UDA

2018-09-26 Thread Riccardo Ferrari
Thank you Doan, Indeed I'm using a FINALFUNC to compute the average already. Bit more context, I'm working on bucketized data, each bucket has already an 'event count' and an 'average' in it. My functions look as follow: //SFUNC CREATE OR REPLACE FUNCTION summaryState(state map >>, name text, av

Re: About UDF/UDA

2018-09-26 Thread DuyHai Doan
A hint to answer your Q3 is to use a final function to perform the flattening or transformation on the result of the aggregation The syntax of an UDA is: CREATE [OR REPLACE] AGGREGATE [IF NOT EXISTS] aggregateName(type1, type2, …) SFUNC accumulatorFunction STYPE stateType [FINALFUNC finalFunction

About UDF/UDA

2018-09-26 Thread Riccardo Ferrari
Hi users! Given my Cassandra version 3.0.x I don't have the famous GROUP BY operator available. So looking around I turned to UDAs. I'm aware all/most of the magic happens on the coordinator and the plan is to keep the data volume low to avoid too much pressure. Q1: How much is low volume. It's