[TD-2298]
This commit is contained in:
parent
caeabf3821
commit
51a8b29a8f
|
@ -3981,8 +3981,7 @@ void scanOneTableDataBlocks(SQueryRuntimeEnv *pRuntimeEnv, TSKEY start) {
|
||||||
if (qstatus.lastKey != pTableQueryInfo->lastKey) {
|
if (qstatus.lastKey != pTableQueryInfo->lastKey) {
|
||||||
qstatus.curWindow.ekey = pTableQueryInfo->lastKey - step;
|
qstatus.curWindow.ekey = pTableQueryInfo->lastKey - step;
|
||||||
} else { // the lastkey does not increase, which means no data checked yet
|
} else { // the lastkey does not increase, which means no data checked yet
|
||||||
qDebug("QInfo:%p no results generated in this scan, abort", pQInfo);
|
qDebug("QInfo:%p no results generated in this scan", pQInfo);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qstatus.lastKey = pTableQueryInfo->lastKey;
|
qstatus.lastKey = pTableQueryInfo->lastKey;
|
||||||
|
@ -4749,7 +4748,23 @@ static TSKEY doSkipIntervalProcess(SQueryRuntimeEnv* pRuntimeEnv, STimeWindow* w
|
||||||
|
|
||||||
static bool skipTimeInterval(SQueryRuntimeEnv *pRuntimeEnv, TSKEY* start) {
|
static bool skipTimeInterval(SQueryRuntimeEnv *pRuntimeEnv, TSKEY* start) {
|
||||||
SQuery *pQuery = pRuntimeEnv->pQuery;
|
SQuery *pQuery = pRuntimeEnv->pQuery;
|
||||||
*start = pQuery->current->lastKey;
|
|
||||||
|
// get the first unclosed time window
|
||||||
|
bool assign = false;
|
||||||
|
for(int32_t i = 0; i < pRuntimeEnv->windowResInfo.size; ++i) {
|
||||||
|
if (pRuntimeEnv->windowResInfo.pResult[i]->closed) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
assign = true;
|
||||||
|
*start = pRuntimeEnv->windowResInfo.pResult[i]->win.skey;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!assign) {
|
||||||
|
*start = pQuery->current->lastKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert(*start <= pQuery->current->lastKey);
|
||||||
|
|
||||||
// if queried with value filter, do NOT forward query start position
|
// if queried with value filter, do NOT forward query start position
|
||||||
if (pQuery->limit.offset <= 0 || pQuery->numOfFilterCols > 0 || pRuntimeEnv->pTSBuf != NULL || pRuntimeEnv->pFillInfo != NULL) {
|
if (pQuery->limit.offset <= 0 || pQuery->numOfFilterCols > 0 || pRuntimeEnv->pTSBuf != NULL || pRuntimeEnv->pFillInfo != NULL) {
|
||||||
|
@ -5441,7 +5456,6 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
|
||||||
} else if (pRuntimeEnv->queryWindowIdentical && pRuntimeEnv->pTSBuf == NULL) {
|
} else if (pRuntimeEnv->queryWindowIdentical && pRuntimeEnv->pTSBuf == NULL) {
|
||||||
//super table projection query with identical query time range for all tables.
|
//super table projection query with identical query time range for all tables.
|
||||||
SDataBlockInfo blockInfo = SDATA_BLOCK_INITIALIZER;
|
SDataBlockInfo blockInfo = SDATA_BLOCK_INITIALIZER;
|
||||||
|
|
||||||
resetDefaultResInfoOutputBuf(pRuntimeEnv);
|
resetDefaultResInfoOutputBuf(pRuntimeEnv);
|
||||||
|
|
||||||
SArray *group = GET_TABLEGROUP(pQInfo, 0);
|
SArray *group = GET_TABLEGROUP(pQInfo, 0);
|
||||||
|
|
Loading…
Reference in New Issue