ehn(query): do some internal refactor.
This commit is contained in:
parent
1fa5eafa8a
commit
f29127a15e
|
@ -3868,7 +3868,9 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SColumnDataAgg*** pBlockS
|
||||||
size_t numOfCols = blockDataGetNumOfCols(pReader->pResBlock);
|
size_t numOfCols = blockDataGetNumOfCols(pReader->pResBlock);
|
||||||
|
|
||||||
int32_t i = 0, j = 0;
|
int32_t i = 0, j = 0;
|
||||||
while (j < numOfCols && i < taosArrayGetSize(pSup->pColAgg)) {
|
size_t size = taosArrayGetSize(pSup->pColAgg);
|
||||||
|
|
||||||
|
while (j < numOfCols && i < size) {
|
||||||
SColumnDataAgg* pAgg = taosArrayGet(pSup->pColAgg, i);
|
SColumnDataAgg* pAgg = taosArrayGet(pSup->pColAgg, i);
|
||||||
if (pAgg->colId == pSup->colIds[j]) {
|
if (pAgg->colId == pSup->colIds[j]) {
|
||||||
if (IS_BSMA_ON(&(pReader->pSchema->columns[i]))) {
|
if (IS_BSMA_ON(&(pReader->pSchema->columns[i]))) {
|
||||||
|
|
|
@ -844,57 +844,6 @@ STimeWindow getAlignQueryTimeWindow(SInterval* pInterval, int32_t precision, int
|
||||||
return win;
|
return win;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static bool overlapWithTimeWindow(STaskAttr* pQueryAttr, SDataBlockInfo* pBlockInfo) {
|
|
||||||
STimeWindow w = {0};
|
|
||||||
|
|
||||||
TSKEY sk = TMIN(pQueryAttr->window.skey, pQueryAttr->window.ekey);
|
|
||||||
TSKEY ek = TMAX(pQueryAttr->window.skey, pQueryAttr->window.ekey);
|
|
||||||
|
|
||||||
if (true) {
|
|
||||||
// getAlignQueryTimeWindow(pQueryAttr, pBlockInfo->window.skey, sk, ek, &w);
|
|
||||||
assert(w.ekey >= pBlockInfo->window.skey);
|
|
||||||
|
|
||||||
if (w.ekey < pBlockInfo->window.ekey) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
// getNextTimeWindow(pQueryAttr, &w);
|
|
||||||
if (w.skey > pBlockInfo->window.ekey) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(w.ekey > pBlockInfo->window.ekey);
|
|
||||||
if (w.skey <= pBlockInfo->window.ekey && w.skey > pBlockInfo->window.skey) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// getAlignQueryTimeWindow(pQueryAttr, pBlockInfo->window.ekey, sk, ek, &w);
|
|
||||||
assert(w.skey <= pBlockInfo->window.ekey);
|
|
||||||
|
|
||||||
if (w.skey > pBlockInfo->window.skey) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
// getNextTimeWindow(pQueryAttr, &w);
|
|
||||||
if (w.ekey < pBlockInfo->window.skey) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
assert(w.skey < pBlockInfo->window.skey);
|
|
||||||
if (w.ekey < pBlockInfo->window.ekey && w.ekey >= pBlockInfo->window.skey) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int32_t loadDataBlockOnDemand(SExecTaskInfo* pTaskInfo, STableScanInfo* pTableScanInfo, SSDataBlock* pBlock,
|
int32_t loadDataBlockOnDemand(SExecTaskInfo* pTaskInfo, STableScanInfo* pTableScanInfo, SSDataBlock* pBlock,
|
||||||
uint32_t* status) {
|
uint32_t* status) {
|
||||||
*status = BLK_DATA_NOT_LOAD;
|
*status = BLK_DATA_NOT_LOAD;
|
||||||
|
|
|
@ -331,7 +331,8 @@ static bool doLoadBlockSMA(STableScanInfo* pTableScanInfo, SSDataBlock* pBlock,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t i = 0; i < taosArrayGetSize(pTableScanInfo->matchInfo.pList); ++i) {
|
size_t num = taosArrayGetSize(pTableScanInfo->matchInfo.pList);
|
||||||
|
for (int32_t i = 0; i < num; ++i) {
|
||||||
SColMatchItem* pColMatchInfo = taosArrayGet(pTableScanInfo->matchInfo.pList, i);
|
SColMatchItem* pColMatchInfo = taosArrayGet(pTableScanInfo->matchInfo.pList, i);
|
||||||
if (!pColMatchInfo->needOutput) {
|
if (!pColMatchInfo->needOutput) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue