提交 9ddff93b 编写于 作者: K kailixu

feat: support 64k for row/column

上级 06494ba5
......@@ -288,10 +288,10 @@ typedef struct {
int32_t index;
int32_t rowSize;
int32_t numOfRows;
void * pIter;
void * pVgIter;
void ** ppShow;
int16_t offset[TSDB_MAX_COLUMNS];
void *pIter;
void *pVgIter;
void **ppShow;
uint16_t offset[TSDB_MAX_COLUMNS];
int32_t bytes[TSDB_MAX_COLUMNS];
int32_t numOfReads;
int8_t maxReplica;
......
......@@ -192,7 +192,7 @@ typedef struct {
typedef struct {
int32_t totalPoints;
int32_t numSampled;
int16_t colBytes;
uint16_t colBytes;
char *values;
int64_t *timeStamps;
char *taglists;
......@@ -5271,7 +5271,7 @@ static void mavg_function(SQLFunctionCtx *pCtx) {
//////////////////////////////////////////////////////////////////////////////////
// Sample function with reservoir sampling algorithm
static void assignResultSample(SQLFunctionCtx *pCtx, SSampleFuncInfo *pInfo, int32_t idx, int64_t ts, void *pData, uint16_t type, int16_t bytes, char *inputTags) {
static void assignResultSample(SQLFunctionCtx *pCtx, SSampleFuncInfo *pInfo, int32_t idx, int64_t ts, void *pData, uint16_t type, uint16_t bytes, char *inputTags) {
assignVal(pInfo->values + idx*bytes, pData, bytes, type);
*(pInfo->timeStamps + idx) = ts;
......@@ -5296,7 +5296,7 @@ static void assignResultSample(SQLFunctionCtx *pCtx, SSampleFuncInfo *pInfo, int
}
}
static void do_reservoir_sample(SQLFunctionCtx *pCtx, SSampleFuncInfo *pInfo, int32_t samplesK, int64_t ts, void *pData, uint16_t type, int16_t bytes) {
static void do_reservoir_sample(SQLFunctionCtx *pCtx, SSampleFuncInfo *pInfo, int32_t samplesK, int64_t ts, void *pData, uint16_t type, uint16_t bytes) {
pInfo->totalPoints++;
if (pInfo->numSampled < samplesK) {
assignResultSample(pCtx, pInfo, pInfo->numSampled, ts, pData, type, bytes, NULL);
......
......@@ -338,7 +338,7 @@ static void sortGroupResByOrderList(SGroupResInfo* pGroupResInfo, SQueryRuntimeE
}
// get dataOffset and index on pRuntimeEnv->pQueryAttr->pExpr1
int16_t dataOffset = 0;
uint16_t dataOffset = 0;
int16_t type = 0;
int32_t bytes = 0;
for (int32_t j = 0; j < pDataBlock->info.numOfCols; ++j) {
......@@ -2283,7 +2283,7 @@ static SQLFunctionCtx* createSQLFunctionCtx(SQueryRuntimeEnv* pRuntimeEnv, SExpr
pCtx->numOfParams = pSqlExpr->numOfParams;
for (int32_t j = 0; j < pCtx->numOfParams; ++j) {
int16_t type = pSqlExpr->param[j].nType;
int16_t bytes = pSqlExpr->param[j].nLen;
int32_t bytes = pSqlExpr->param[j].nLen;
if (pSqlExpr->functionId == TSDB_FUNC_STDDEV_DST || pSqlExpr->functionId == TSDB_FUNC_TS_COMP) {
continue;
}
......@@ -3297,7 +3297,7 @@ void doCompactSDataBlock(SSDataBlock* pBlock, int32_t numOfRows, int8_t* p) {
for (int32_t i = 0; i < pBlock->info.numOfCols; ++i) {
SColumnInfoData* pColumnInfoData = taosArrayGet(pBlock->pDataBlock, i);
int16_t bytes = pColumnInfoData->info.bytes;
int32_t bytes = pColumnInfoData->info.bytes;
memmove(((char*)pColumnInfoData->pData) + start * bytes, pColumnInfoData->pData + cstart * bytes,
len * bytes);
}
......@@ -3313,7 +3313,7 @@ void doCompactSDataBlock(SSDataBlock* pBlock, int32_t numOfRows, int8_t* p) {
for (int32_t i = 0; i < pBlock->info.numOfCols; ++i) {
SColumnInfoData* pColumnInfoData = taosArrayGet(pBlock->pDataBlock, i);
int16_t bytes = pColumnInfoData->info.bytes;
int32_t bytes = pColumnInfoData->info.bytes;
memmove(pColumnInfoData->pData + start * bytes, pColumnInfoData->pData + cstart * bytes, len * bytes);
}
......@@ -6681,7 +6681,7 @@ static SSDataBlock* doLimit(void* param, bool* newgroup) {
for (int32_t i = 0; i < pBlock->info.numOfCols; ++i) {
SColumnInfoData* pColInfoData = taosArrayGet(pBlock->pDataBlock, i);
int16_t bytes = pColInfoData->info.bytes;
int32_t bytes = pColInfoData->info.bytes;
memmove(pColInfoData->pData, pColInfoData->pData + skip * bytes, remain * bytes);
}
......@@ -7384,7 +7384,7 @@ static void doStateWindowAggImpl(SOperatorInfo* pOperator, SStateWindowOperatorI
SOptrBasicInfo* pBInfo = &pInfo->binfo;
bool masterScan = IS_MASTER_SCAN(pRuntimeEnv);
int16_t bytes = pColInfoData->info.bytes;
int32_t bytes = pColInfoData->info.bytes;
// int16_t type = pColInfoData->info.type;
SColumnInfoData* pTsColInfoData = taosArrayGet(pSDataBlock->pDataBlock, 0);
......@@ -8584,7 +8584,7 @@ static SSDataBlock* doTagScan(void* param, bool* newgroup) {
count = 0;
uint16_t bytes = pExprInfo->base.resBytes;
int32_t bytes = pExprInfo->base.resBytes;
int16_t type = pExprInfo->base.resType;
for (int32_t i = 0; i < pQueryAttr->numOfTags; ++i) {
......@@ -8659,7 +8659,7 @@ static SSDataBlock* doTagScan(void* param, bool* newgroup) {
char * data = NULL, *dst = NULL;
int16_t type = 0;
uint16_t bytes = 0;
int32_t bytes = 0;
for (int32_t j = 0; j < pOperator->numOfOutput; ++j) {
// not assign value in case of user defined constant output column
if (TSDB_COL_IS_UD_COL(pExprInfo[j].base.colInfo.flag)) {
......@@ -9691,7 +9691,7 @@ int32_t createQueryFunc(SQueriedTableInfo* pTableInfo, int32_t numOfOutput, SExp
}
int16_t type = 0;
int16_t bytes = 0;
uint16_t bytes = 0;
// parse the arithmetic expression
if (pExprs[i].base.functionId == TSDB_FUNC_SCALAR_EXPR) {
......@@ -9834,7 +9834,7 @@ int32_t createIndirectQueryFuncExprFromMsg(SQueryTableMsg* pQueryMsg, int32_t nu
pExprs[i].base.resType = 0;
int16_t type = 0;
int16_t bytes = 0;
int32_t bytes = 0;
// parse the arithmetic expression
if (pExprs[i].base.functionId == TSDB_FUNC_SCALAR_EXPR) {
......
......@@ -268,7 +268,7 @@ tMemBucket *tMemBucketCreate(uint16_t nElemSize, int16_t dataType, double minval
return NULL;
}
qDebug("MemBucket:%p, elem size:%d", pBucket, pBucket->bytes);
qDebug("MemBucket:%p, elem size:%" PRIu16, pBucket, pBucket->bytes);
return pBucket;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册