diff --git a/source/libs/function/inc/tudf.h b/source/libs/function/inc/tudf.h index 64a7dd126f2d4eb9f71fa4b8f715d0ec51ec83e8..fa009833c6a96627ef83ef4abc9a1604bdd7e9e7 100644 --- a/source/libs/function/inc/tudf.h +++ b/source/libs/function/inc/tudf.h @@ -99,13 +99,16 @@ typedef struct SUdfInterBuf { // input: block, initFirst // output: interbuf -int32_t callUdfAggProcess(SUdfDataBlock block, SUdfInterBuf *interBuf, bool initFirst); +int32_t callUdfAggProcess(SUdfDataBlock *block, SUdfInterBuf *interBuf, bool initFirst); // input: interBuf // output: resultData -int32_t callUdfAggFinalize(SUdfInterBuf interBuf, SUdfColumnData* resultData); +int32_t callUdfAggFinalize(SUdfInterBuf *interBuf, SUdfColumnData *resultData); +// input: interbuf1, interbuf2 +// output: resultBuf +int32_t callUdfAggMerge(SUdfInterBuf *interBuf1, SUdfInterBuf *interBuf2, SUdfInterBuf *resultBuf); // input: block // output: resultData -int32_t callUdfScalaProcess(SUdfDataBlock block, SUdfColumnData* resultData); +int32_t callUdfScalaProcess(SUdfDataBlock *block, SUdfColumnData *resultData); /** * tearn down udf diff --git a/source/libs/function/inc/tudfInt.h b/source/libs/function/inc/tudfInt.h index d765a8d2dc10dec826bb5ced74771dd6229d5c65..20fc98a08a961829efaf328d7af4716dacf658c0 100644 --- a/source/libs/function/inc/tudfInt.h +++ b/source/libs/function/inc/tudfInt.h @@ -31,6 +31,7 @@ enum { enum { TSDB_UDF_CALL_AGG_PROC = 0, + TSDB_UDF_CALL_AGG_MERGE, TSDb_UDF_CALL_AGG_FIN, TSDB_UDF_CALL_SCALA_PROC, }; diff --git a/source/libs/function/test/udf1.c b/source/libs/function/test/udf1.c index abe6e59984ec99c5c06ad31740c7179981c53ab8..31e7a36e9c8e24a2c17d431c2bf17705de45ff98 100644 --- a/source/libs/function/test/udf1.c +++ b/source/libs/function/test/udf1.c @@ -8,6 +8,7 @@ #define malloc malloc #undef free #define free free + int32_t udf1_setup() { return 0; }