From 4541b69b2f7d450e6601a72a75d4f2623b0609e1 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Wed, 1 Sep 2021 14:58:35 +0800 Subject: [PATCH] remove aggregate from .data/.last --- src/tsdb/inc/tsdbReadImpl.h | 12 ++++++------ src/tsdb/src/tsdbCommit.c | 6 +++--- src/tsdb/src/tsdbReadImpl.c | 3 +++ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/tsdb/inc/tsdbReadImpl.h b/src/tsdb/inc/tsdbReadImpl.h index 9c91e39650..86063b5563 100644 --- a/src/tsdb/inc/tsdbReadImpl.h +++ b/src/tsdb/inc/tsdbReadImpl.h @@ -66,12 +66,12 @@ typedef struct { int32_t len; uint32_t type : 8; uint32_t offset : 24; - int64_t sum; - int64_t max; - int64_t min; - int16_t maxIndex; - int16_t minIndex; - int16_t numOfNull; + // int64_t sum; + // int64_t max; + // int64_t min; + // int16_t maxIndex; + // int16_t minIndex; + // int16_t numOfNull; uint8_t offsetH; char padding[1]; } SBlockCol; diff --git a/src/tsdb/src/tsdbCommit.c b/src/tsdb/src/tsdbCommit.c index 6a26dbdb82..c39367bcc8 100644 --- a/src/tsdb/src/tsdbCommit.c +++ b/src/tsdb/src/tsdbCommit.c @@ -1098,9 +1098,9 @@ int tsdbWriteBlockImpl(STsdbRepo *pRepo, STable *pTable, SDFile *pDFile, SDFile pAggrBlkCol->colId = pDataCol->colId; if (tDataTypes[pDataCol->type].statisFunc) { - (*tDataTypes[pDataCol->type].statisFunc)(pDataCol->pData, rowsToWrite, &(pBlockCol->min), &(pBlockCol->max), - &(pBlockCol->sum), &(pBlockCol->minIndex), &(pBlockCol->maxIndex), - &(pBlockCol->numOfNull)); + // (*tDataTypes[pDataCol->type].statisFunc)(pDataCol->pData, rowsToWrite, &(pBlockCol->min), &(pBlockCol->max), + // &(pBlockCol->sum), &(pBlockCol->minIndex), &(pBlockCol->maxIndex), + // &(pBlockCol->numOfNull)); (*tDataTypes[pDataCol->type].statisFunc)(pDataCol->pData, rowsToWrite, &(pAggrBlkCol->min), &(pAggrBlkCol->max), &(pAggrBlkCol->sum), &(pAggrBlkCol->minIndex), &(pAggrBlkCol->maxIndex), &(pAggrBlkCol->numOfNull)); diff --git a/src/tsdb/src/tsdbReadImpl.c b/src/tsdb/src/tsdbReadImpl.c index adfbde42a0..e8345fd91e 100644 --- a/src/tsdb/src/tsdbReadImpl.c +++ b/src/tsdb/src/tsdbReadImpl.c @@ -415,6 +415,8 @@ void *tsdbDecodeSBlockIdx(void *buf, SBlockIdx *pIdx) { void tsdbGetBlockStatis(SReadH *pReadh, SDataStatis *pStatis, int numOfCols) { if (!tsdbQueryFromSMA) { + ASSERT(0); // remove Statis from .data/.last + #if 0 SBlockData *pBlockData = pReadh->pBlkData; for (int i = 0, j = 0; i < numOfCols;) { @@ -440,6 +442,7 @@ void tsdbGetBlockStatis(SReadH *pReadh, SDataStatis *pStatis, int numOfCols) { j++; } } + #endif } else { SAggrBlkData *pAggrBlkData = pReadh->pAggrBlkData; -- GitLab