fix:add combine function for last row
This commit is contained in:
parent
af53a3a226
commit
3a12e36b4b
|
@ -2500,7 +2500,8 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
.sprocessFunc = firstLastScalarFunction,
|
.sprocessFunc = firstLastScalarFunction,
|
||||||
.pPartialFunc = "_last_row_partial",
|
.pPartialFunc = "_last_row_partial",
|
||||||
.pMergeFunc = "_last_row_merge",
|
.pMergeFunc = "_last_row_merge",
|
||||||
.finalizeFunc = firstLastFinalize
|
.finalizeFunc = firstLastFinalize,
|
||||||
|
.combineFunc = lastCombine
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.name = "_cache_last_row",
|
.name = "_cache_last_row",
|
||||||
|
@ -2809,7 +2810,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
{
|
{
|
||||||
.name = "mode",
|
.name = "mode",
|
||||||
.type = FUNCTION_TYPE_MODE,
|
.type = FUNCTION_TYPE_MODE,
|
||||||
.classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_SELECT_FUNC,
|
.classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_SELECT_FUNC | FUNC_MGT_FORBID_STREAM_FUNC,
|
||||||
.translateFunc = translateMode,
|
.translateFunc = translateMode,
|
||||||
.getEnvFunc = getModeFuncEnv,
|
.getEnvFunc = getModeFuncEnv,
|
||||||
.initFunc = modeFunctionSetup,
|
.initFunc = modeFunctionSetup,
|
||||||
|
@ -3212,7 +3213,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
{
|
{
|
||||||
.name = "_block_dist",
|
.name = "_block_dist",
|
||||||
.type = FUNCTION_TYPE_BLOCK_DIST,
|
.type = FUNCTION_TYPE_BLOCK_DIST,
|
||||||
.classification = FUNC_MGT_AGG_FUNC,
|
.classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_FORBID_STREAM_FUNC,
|
||||||
.translateFunc = translateBlockDistFunc,
|
.translateFunc = translateBlockDistFunc,
|
||||||
.getEnvFunc = getBlockDistFuncEnv,
|
.getEnvFunc = getBlockDistFuncEnv,
|
||||||
.initFunc = blockDistSetup,
|
.initFunc = blockDistSetup,
|
||||||
|
|
|
@ -284,7 +284,7 @@ sql create table ccc using st tags(3,2,2);
|
||||||
sql create table ddd using st tags(4,2,2);
|
sql create table ddd using st tags(4,2,2);
|
||||||
|
|
||||||
|
|
||||||
sql create stream streams1 ignore expired 0 fill_history 0 watermark 3s into streamst subtable(c) as select _wstart, c , count(*) c1 from st partition by c interval(1s) ;
|
sql create stream streams1 ignore expired 0 fill_history 0 watermark 3s into streamst subtable(c) as select _wstart, c , count(*) c1, last_row(b) c2 from st partition by c interval(1s) ;
|
||||||
|
|
||||||
sql insert into aaa values(1648791221001,2,2,"/a1/aa/aa");
|
sql insert into aaa values(1648791221001,2,2,"/a1/aa/aa");
|
||||||
sql insert into bbb values(1648791221001,2,2,"/a1/aa/aa");
|
sql insert into bbb values(1648791221001,2,2,"/a1/aa/aa");
|
||||||
|
|
Loading…
Reference in New Issue