From 900fe01f0ed103ed224fd959c54fde3e4f2d8e08 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 29 Nov 2022 19:32:51 +0800 Subject: [PATCH] fix error --- source/libs/executor/src/executorimpl.c | 5 ++--- source/libs/function/src/builtinsimpl.c | 6 +++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 6df464b06e..14be6326e0 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -1425,7 +1425,7 @@ static int32_t createDataBlockForEmptyInput(SOperatorInfo* pOperator, SSDataBloc } SOperatorInfo* downstream = pOperator->pDownstream[0]; - if (downstream->operatorType != QUERY_NODE_PHYSICAL_PLAN_PARTITION || + if (downstream->operatorType == QUERY_NODE_PHYSICAL_PLAN_PARTITION || (downstream->operatorType == QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN && ((STableScanInfo *)downstream->info)->hasGroupByTag == true)) { return TSDB_CODE_SUCCESS; @@ -1514,8 +1514,7 @@ static int32_t doOpenAggregateOptr(SOperatorInfo* pOperator) { while (1) { SSDataBlock* pBlock = downstream->fpSet.getNextFn(downstream); if (pBlock == NULL) { - if (!hasValidBlock && - downstream->operatorType != QUERY_NODE_PHYSICAL_PLAN_PARTITION) { + if (!hasValidBlock) { createDataBlockForEmptyInput(pOperator, &pBlock); if (pBlock == NULL) { break; diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index acbddc7128..1881372e34 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -3930,12 +3930,16 @@ static void hllTransferInfo(SHLLInfo* pInput, SHLLInfo* pOutput) { int32_t hllFunctionMerge(SqlFunctionCtx* pCtx) { SInputColumnInfoData* pInput = &pCtx->input; SColumnInfoData* pCol = pInput->pData[0]; - ASSERT(pCol->info.type == TSDB_DATA_TYPE_BINARY); + + if (pCol->info.type != TSDB_DATA_TYPE_BINARY) { + return TSDB_CODE_SUCCESS; + } SHLLInfo* pInfo = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); int32_t start = pInput->startRowIndex; + for (int32_t i = start; i < start + pInput->numOfRows; ++i) { char* data = colDataGetData(pCol, i); SHLLInfo* pInputInfo = (SHLLInfo*)varDataVal(data); -- GitLab