enh(query): add spread function distributed splitting

This commit is contained in:
Ganlin Zhao 2022-06-08 14:26:45 +08:00
parent ec5da952f9
commit ad895c243d
2 changed files with 24 additions and 0 deletions

View File

@ -125,6 +125,8 @@ typedef enum EFunctionType {
// distributed splitting functions
FUNCTION_TYPE_APERCENTILE_PARTIAL,
FUNCTION_TYPE_APERCENTILE_MERGE,
FUNCTION_TYPE_SPREAD_PARTIAL,
FUNCTION_TYPE_SPREAD_MERGE,
// user defined funcion
FUNCTION_TYPE_UDF = 10000

View File

@ -1279,6 +1279,28 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.processFunc = spreadFunction,
.finalizeFunc = spreadFinalize
},
{
.name = "_spread_partial",
.type = FUNCTION_TYPE_SPREAD_PARTIAL,
.classification = FUNC_MGT_AGG_FUNC,
.translateFunc = translateSpread,
.dataRequiredFunc = statisDataRequired,
.getEnvFunc = getSpreadFuncEnv,
.initFunc = spreadFunctionSetup,
.processFunc = spreadFunction,
.finalizeFunc = spreadFinalize
},
{
.name = "_spread_merge",
.type = FUNCTION_TYPE_SPREAD_MERGE,
.classification = FUNC_MGT_AGG_FUNC,
.translateFunc = translateSpread,
.dataRequiredFunc = statisDataRequired,
.getEnvFunc = getSpreadFuncEnv,
.initFunc = spreadFunctionSetup,
.processFunc = spreadFunction,
.finalizeFunc = spreadFinalize
},
{
.name = "elapsed",
.type = FUNCTION_TYPE_ELAPSED,