fix: cols func

This commit is contained in:
factosea 2024-12-27 08:56:28 +08:00
parent 983431bab6
commit 465f19567e
4 changed files with 3 additions and 16 deletions

View File

@ -209,8 +209,6 @@ typedef enum EFunctionType {
FUNCTION_TYPE_HYPERLOGLOG_STATE, FUNCTION_TYPE_HYPERLOGLOG_STATE,
FUNCTION_TYPE_HYPERLOGLOG_STATE_MERGE, FUNCTION_TYPE_HYPERLOGLOG_STATE_MERGE,
FUNCTION_TYPE_COLS_PARTIAL,
FUNCTION_TYPE_COLS_MERGE,
// geometry functions // geometry functions
FUNCTION_TYPE_GEOM_FROM_TEXT = 4250, FUNCTION_TYPE_GEOM_FROM_TEXT = 4250,

View File

@ -1233,17 +1233,6 @@ static int32_t translateForecastConf(SFunctionNode* pFunc, char* pErrBuf, int32_
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
static int32_t translateCols(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
pFunc->node.resType = (SDataType){.bytes = tDataTypes[TSDB_DATA_TYPE_FLOAT].bytes, .type = TSDB_DATA_TYPE_FLOAT};
return TSDB_CODE_SUCCESS;
}
bool getColFuncEnv(SFunctionNode* pFunc, SFuncExecEnv* pEnv) {
SColumnNode* pNode = (SColumnNode*)nodesListGetNode(pFunc->pParameterList, 0);
return true;
}
static EFuncReturnRows forecastEstReturnRows(SFunctionNode* pFunc) { return FUNC_RETURN_ROWS_N; } static EFuncReturnRows forecastEstReturnRows(SFunctionNode* pFunc) { return FUNC_RETURN_ROWS_N; }
static int32_t translateDiff(SFunctionNode* pFunc, char* pErrBuf, int32_t len) { static int32_t translateDiff(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
@ -2742,7 +2731,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
.translateFunc = translateOutFirstIn, .translateFunc = translateOutFirstIn,
.dynDataRequiredFunc = firstDynDataReq, .dynDataRequiredFunc = firstDynDataReq,
.getEnvFunc = getFirstLastFuncEnv, .getEnvFunc = getFirstLastFuncEnv,
.initFunc = functionSetup, .initFunc = firstLastFunctionSetup,
.processFunc = firstFunction, .processFunc = firstFunction,
.sprocessFunc = firstLastScalarFunction, .sprocessFunc = firstLastScalarFunction,
.finalizeFunc = firstLastFinalize, .finalizeFunc = firstLastFinalize,

View File

@ -946,7 +946,7 @@ int32_t setSelectivityValue(SqlFunctionCtx* pCtx, SSDataBlock* pBlock, const STu
if (nullList[j]) { if (nullList[j]) {
colDataSetNULL(pDstCol, rowIndex); colDataSetNULL(pDstCol, rowIndex);
} else { } else {
code = colDataSetVal(pDstCol, rowIndex, pStart, false); code = colDataSetValOrCover(pDstCol, rowIndex, pStart, false);
if (TSDB_CODE_SUCCESS != code) { if (TSDB_CODE_SUCCESS != code) {
return code; return code;
} }

View File

@ -140,7 +140,7 @@ static bool functionNodeEqual(const SFunctionNode* a, const SFunctionNode* b) {
COMPARE_NODE_LIST_FIELD(pParameterList); COMPARE_NODE_LIST_FIELD(pParameterList);
if (a->funcType == FUNCTION_TYPE_SELECT_VALUE) { if (a->funcType == FUNCTION_TYPE_SELECT_VALUE) {
if ((a->node.bindTupleFuncIdx != b->node.bindTupleFuncIdx) && if ((a->node.bindTupleFuncIdx != b->node.bindTupleFuncIdx) &&
(a->node.bindTupleFuncIdx != 0 != b->node.bindTupleFuncIdx != 0)) (a->node.bindTupleFuncIdx != 0 || b->node.bindTupleFuncIdx != 0))
return false; return false;
} }
return true; return true;