diff --git a/include/libs/function/function.h b/include/libs/function/function.h index 32db6773e07ce61ad1ef100713b3bb696a36f09d..4fbcf7e3ce456f801398eb49320b59328854f327 100644 --- a/include/libs/function/function.h +++ b/include/libs/function/function.h @@ -76,7 +76,7 @@ enum { enum { MAIN_SCAN = 0x0u, REVERSE_SCAN = 0x1u, // todo remove it - REPEAT_SCAN = 0x2u, // repeat scan belongs to the master scan + PRE_SCAN = 0x2u, // pre-scan belongs to the main scan and occurs before main scan }; typedef struct SPoint1 { diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index e539b3df06ad2e79a39c2c155ca117e5aa8bfbeb..7907cd4312824ad7790d182f69e6154cd419895e 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -538,7 +538,7 @@ bool functionNeedToExecute(SqlFunctionCtx* pCtx) { return false; } - if (pCtx->scanFlag == REPEAT_SCAN) { + if (pCtx->scanFlag == PRE_SCAN) { return fmIsRepeatScanFunc(pCtx->functionId); } diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 097d6da63a4a6e7dd7499d3441b550059d15dd28..0c3d5bbe7da752cb9a4aabca5ea3d3a86ca88997 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -880,10 +880,11 @@ SOperatorInfo* createTableScanOperatorInfo(STableScanPhysiNode* pTableScanNode, pInfo->scanInfo = (SScanInfo){.numOfAsc = pTableScanNode->scanSeq[0], .numOfDesc = pTableScanNode->scanSeq[1]}; if (pInfo->scanInfo.numOfAsc > 1) { - pInfo->base.scanFlag = REPEAT_SCAN; + pInfo->base.scanFlag = PRE_SCAN; } else { pInfo->base.scanFlag = MAIN_SCAN; } + pInfo->base.pdInfo.interval = extractIntervalInfo(pTableScanNode); pInfo->base.readHandle = *readHandle; pInfo->base.dataBlockLoadFlag = pTableScanNode->dataRequired;