fix:error in group by tag
This commit is contained in:
parent
5557c2ef93
commit
b6b4455689
|
@ -595,7 +595,8 @@ static int32_t setSelectValueColumnInfo(SqlFunctionCtx* pCtx, int32_t numOfOutpu
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfOutput; ++i) {
|
for (int32_t i = 0; i < numOfOutput; ++i) {
|
||||||
if (strcmp(pCtx[i].pExpr->pExpr->_function.functionName, "_select_value") == 0) {
|
if (strcmp(pCtx[i].pExpr->pExpr->_function.functionName, "_select_value") == 0 ||
|
||||||
|
strcmp(pCtx[i].pExpr->pExpr->_function.functionName, "_group_key") == 0) {
|
||||||
pValCtx[num++] = &pCtx[i];
|
pValCtx[num++] = &pCtx[i];
|
||||||
} else if (fmIsSelectFunc(pCtx[i].functionId)) {
|
} else if (fmIsSelectFunc(pCtx[i].functionId)) {
|
||||||
p = &pCtx[i];
|
p = &pCtx[i];
|
||||||
|
|
|
@ -2517,7 +2517,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
{
|
{
|
||||||
.name = "_group_key",
|
.name = "_group_key",
|
||||||
.type = FUNCTION_TYPE_GROUP_KEY,
|
.type = FUNCTION_TYPE_GROUP_KEY,
|
||||||
.classification = FUNC_MGT_AGG_FUNC,
|
.classification = FUNC_MGT_AGG_FUNC | FUNC_MGT_SELECT_FUNC,
|
||||||
.translateFunc = translateGroupKey,
|
.translateFunc = translateGroupKey,
|
||||||
.getEnvFunc = getGroupKeyFuncEnv,
|
.getEnvFunc = getGroupKeyFuncEnv,
|
||||||
.initFunc = functionSetup,
|
.initFunc = functionSetup,
|
||||||
|
|
|
@ -1485,6 +1485,8 @@ void setSelectivityValue(SqlFunctionCtx* pCtx, SSDataBlock* pBlock, const STuple
|
||||||
colDataAppend(pDstCol, rowIndex, (pStart + ps), false);
|
colDataAppend(pDstCol, rowIndex, (pStart + ps), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
releaseBufPage(pCtx->pBuf, pPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue