未验证 提交 4a144d32 编写于 作者: H Haojun Liao 提交者: GitHub

Merge pull request #7677 from taosdata/feature/query

[td-6434]<fix>: enable min/max function for unsigned number column.
......@@ -948,7 +948,6 @@ SSDataBlock* doGlobalAggregate(void* param, bool* newgroup) {
if (handleData) { // data in current group is all handled
doFinalizeResultImpl(pAggInfo, pAggInfo->binfo.pCtx, pOperator->numOfOutput);
int32_t numOfRows = getNumOfResult(pOperator->pRuntimeEnv, pAggInfo->binfo.pCtx, pOperator->numOfOutput);
pAggInfo->binfo.pRes->info.rows += numOfRows;
......
......@@ -2749,7 +2749,7 @@ void tscHandleSubqueryError(SRetrieveSupport *trsupport, SSqlObj *pSql, int numO
}
} else { // reach the maximum retry count, abort
atomic_val_compare_exchange_32(&pParentSql->res.code, TSDB_CODE_SUCCESS, numOfRows);
tscError("0x%"PRIx64" sub:0x%"PRIx64" retrieve failed,code:%s,orderOfSub:%d failed.no more retry,set global code:%s", pParentSql->self, pSql->self,
tscError("0x%"PRIx64" sub:0x%"PRIx64" retrieve failed, code:%s, orderOfSub:%d FAILED. no more retry, set global code:%s", pParentSql->self, pSql->self,
tstrerror(numOfRows), subqueryIndex, tstrerror(pParentSql->res.code));
}
}
......
......@@ -1214,6 +1214,31 @@ static int32_t minmax_merge_impl(SQLFunctionCtx *pCtx, int32_t bytes, char *outp
DUPATE_DATA_WITHOUT_TS(pCtx, *(int64_t *)output, v, notNullElems, isMin);
break;
}
case TSDB_DATA_TYPE_UTINYINT: {
uint8_t v = GET_UINT8_VAL(input);
DUPATE_DATA_WITHOUT_TS(pCtx, *(uint8_t *)output, v, notNullElems, isMin);
break;
}
case TSDB_DATA_TYPE_USMALLINT: {
uint16_t v = GET_UINT16_VAL(input);
DUPATE_DATA_WITHOUT_TS(pCtx, *(uint16_t *)output, v, notNullElems, isMin);
break;
}
case TSDB_DATA_TYPE_UINT: {
uint32_t v = GET_UINT32_VAL(input);
DUPATE_DATA_WITHOUT_TS(pCtx, *(uint32_t *)output, v, notNullElems, isMin);
break;
}
case TSDB_DATA_TYPE_UBIGINT: {
uint64_t v = GET_UINT64_VAL(input);
DUPATE_DATA_WITHOUT_TS(pCtx, *(uint64_t *)output, v, notNullElems, isMin);
break;
}
default:
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册