[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 lastFunction(SqlFunctionCtx *pCtx);
|
||||
|
||||
void valFunction(SqlFunctionCtx *pCtx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -81,6 +81,16 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
|||
.processFunc = lastFunction,
|
||||
.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",
|
||||
.type = FUNCTION_TYPE_CONCAT,
|
||||
|
|
|
@ -554,3 +554,11 @@ void lastFunction(SqlFunctionCtx *pCtx) {
|
|||
|
||||
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
|
||||
|
||||
# ---- insert
|
||||
./test.sh -f tsim/insert/basic0.sim
|
||||
#./test.sh -f tsim/insert/basic0.sim
|
||||
|
||||
# ---- query
|
||||
./test.sh -f tsim/query/interval.sim
|
||||
|
|
Loading…
Reference in New Issue