[td-13039] support group by.
This commit is contained in:
parent
ef50049a8b
commit
3a6be84b80
|
@ -41,6 +41,8 @@ bool getFirstLastFuncEnv(SFunctionNode* pFunc, SFuncExecEnv* pEnv);
|
||||||
void firstFunction(SqlFunctionCtx *pCtx);
|
void firstFunction(SqlFunctionCtx *pCtx);
|
||||||
void lastFunction(SqlFunctionCtx *pCtx);
|
void lastFunction(SqlFunctionCtx *pCtx);
|
||||||
|
|
||||||
|
void valFunction(SqlFunctionCtx *pCtx);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -81,6 +81,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
.processFunc = lastFunction,
|
.processFunc = lastFunction,
|
||||||
.finalizeFunc = functionFinalizer
|
.finalizeFunc = functionFinalizer
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// .name = "valueAssigner",
|
||||||
|
// .type = FUNCTION_TYPE_ASSIGNER,
|
||||||
|
// .classification = FUNC_MGT_AGG_FUNC,
|
||||||
|
// .checkFunc = stubCheckAndGetResultType,
|
||||||
|
// .getEnvFunc = getFirstLastFuncEnv,
|
||||||
|
// .initFunc = functionSetup,
|
||||||
|
// .processFunc = valFunction,
|
||||||
|
// .finalizeFunc = functionFinalizer
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
.name = "concat",
|
.name = "concat",
|
||||||
.type = FUNCTION_TYPE_CONCAT,
|
.type = FUNCTION_TYPE_CONCAT,
|
||||||
|
|
|
@ -554,3 +554,11 @@ void lastFunction(SqlFunctionCtx *pCtx) {
|
||||||
|
|
||||||
SET_VAL(pResInfo, numOfElems, 1);
|
SET_VAL(pResInfo, numOfElems, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void valFunction(SqlFunctionCtx *pCtx) {
|
||||||
|
SResultRowEntryInfo *pResInfo = GET_RES_INFO(pCtx);
|
||||||
|
char* buf = GET_ROWCELL_INTERBUF(pResInfo);
|
||||||
|
|
||||||
|
SColumnInfoData* pInputCol = pCtx->input.pData[0];
|
||||||
|
memcpy(buf, pInputCol->pData, pInputCol->info.bytes);
|
||||||
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
./test.sh -f tsim/dnode/basic1.sim
|
./test.sh -f tsim/dnode/basic1.sim
|
||||||
|
|
||||||
# ---- insert
|
# ---- insert
|
||||||
./test.sh -f tsim/insert/basic0.sim
|
#./test.sh -f tsim/insert/basic0.sim
|
||||||
|
|
||||||
# ---- query
|
# ---- query
|
||||||
./test.sh -f tsim/query/interval.sim
|
./test.sh -f tsim/query/interval.sim
|
||||||
|
|
Loading…
Reference in New Issue