fix(query): add one more attribute in SSDataBlock.
This commit is contained in:
parent
35fccc49d8
commit
2a696d2790
|
@ -65,14 +65,12 @@ typedef struct SDataBlockInfo {
|
||||||
STimeWindow window;
|
STimeWindow window;
|
||||||
int32_t rows;
|
int32_t rows;
|
||||||
int32_t rowSize;
|
int32_t rowSize;
|
||||||
union {
|
int64_t uid; // the uid of table, from which current data block comes
|
||||||
int64_t uid; // from which table of uid, comes from this data block
|
int64_t blockId; // block id, generated by physical planner
|
||||||
int64_t blockId;
|
uint64_t groupId; // no need to serialize
|
||||||
};
|
int16_t numOfCols;
|
||||||
uint64_t groupId; // no need to serialize
|
int16_t hasVarCol;
|
||||||
int16_t numOfCols;
|
int16_t capacity;
|
||||||
int16_t hasVarCol;
|
|
||||||
int16_t capacity;
|
|
||||||
} SDataBlockInfo;
|
} SDataBlockInfo;
|
||||||
|
|
||||||
typedef struct SSDataBlock {
|
typedef struct SSDataBlock {
|
||||||
|
|
|
@ -165,7 +165,7 @@ typedef struct SInputColumnInfoData {
|
||||||
SColumnInfoData *pPTS; // primary timestamp column
|
SColumnInfoData *pPTS; // primary timestamp column
|
||||||
SColumnInfoData **pData;
|
SColumnInfoData **pData;
|
||||||
SColumnDataAgg **pColumnDataAgg;
|
SColumnDataAgg **pColumnDataAgg;
|
||||||
uint64_t uid; // table uid
|
uint64_t uid; // table uid, used to set the tag value when building the final query result for selectivity functions.
|
||||||
} SInputColumnInfoData;
|
} SInputColumnInfoData;
|
||||||
|
|
||||||
// sql function runtime context
|
// sql function runtime context
|
||||||
|
|
|
@ -184,8 +184,6 @@ int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableScanInfo,
|
||||||
qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d", GET_TASKID(pTaskInfo),
|
qDebug("%s data block skipped, brange:%" PRId64 "-%" PRId64 ", rows:%d", GET_TASKID(pTaskInfo),
|
||||||
pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows);
|
pBlockInfo->window.skey, pBlockInfo->window.ekey, pBlockInfo->rows);
|
||||||
pCost->skipBlocks += 1;
|
pCost->skipBlocks += 1;
|
||||||
|
|
||||||
pBlock->info.blockId = 0;
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
} else if (*status == FUNC_DATA_REQUIRED_STATIS_LOAD) {
|
} else if (*status == FUNC_DATA_REQUIRED_STATIS_LOAD) {
|
||||||
pCost->loadBlockStatis += 1;
|
pCost->loadBlockStatis += 1;
|
||||||
|
@ -206,7 +204,6 @@ int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableScanInfo,
|
||||||
pBlock->pBlockAgg[pColMatchInfo->targetSlotId] = pColAgg[i];
|
pBlock->pBlockAgg[pColMatchInfo->targetSlotId] = pColAgg[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
pBlock->info.blockId = 0;
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
} else { // failed to load the block sma data, data block statistics does not exist, load data block instead
|
} else { // failed to load the block sma data, data block statistics does not exist, load data block instead
|
||||||
*status = FUNC_DATA_REQUIRED_DATA_LOAD;
|
*status = FUNC_DATA_REQUIRED_DATA_LOAD;
|
||||||
|
@ -235,11 +232,6 @@ int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableScanInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
relocateColumnData(pBlock, pTableScanInfo->pColMatchInfo, pCols);
|
relocateColumnData(pBlock, pTableScanInfo->pColMatchInfo, pCols);
|
||||||
|
|
||||||
// reset the block to be 0 by default, this blockId is assigned by physical plan and is used by direct upstream
|
|
||||||
// operator.
|
|
||||||
pBlock->info.blockId = 0;
|
|
||||||
|
|
||||||
doFilter(pTableScanInfo->pFilterNode, pBlock);
|
doFilter(pTableScanInfo->pFilterNode, pBlock);
|
||||||
if (pBlock->info.rows == 0) {
|
if (pBlock->info.rows == 0) {
|
||||||
pCost->filterOutBlocks += 1;
|
pCost->filterOutBlocks += 1;
|
||||||
|
|
Loading…
Reference in New Issue