enh: last_row function scan in reverse order
This commit is contained in:
parent
77ed2bc1e1
commit
c8c9bbdeb1
|
@ -242,7 +242,7 @@ static int32_t scanPathOptGetScanOrder(SScanLogicNode* pScan, EScanOrder* pScanO
|
|||
SFunctionNode* pFunc = (SFunctionNode*)pNode;
|
||||
if (FUNCTION_TYPE_FIRST == pFunc->funcType) {
|
||||
hasFirst = true;
|
||||
} else if (FUNCTION_TYPE_LAST == pFunc->funcType) {
|
||||
} else if (FUNCTION_TYPE_LAST == pFunc->funcType || FUNCTION_TYPE_LAST_ROW == pFunc->funcType) {
|
||||
hasLast = true;
|
||||
} else if (FUNCTION_TYPE_SELECT_VALUE != pFunc->funcType) {
|
||||
otherFunc = true;
|
||||
|
@ -436,8 +436,8 @@ static int32_t pushDownCondOptDealScan(SOptimizeContext* pCxt, SScanLogicNode* p
|
|||
|
||||
SNode* pPrimaryKeyCond = NULL;
|
||||
SNode* pOtherCond = NULL;
|
||||
int32_t code = filterPartitionCond(&pScan->node.pConditions, &pPrimaryKeyCond, &pScan->pTagIndexCond, &pScan->pTagCond,
|
||||
&pOtherCond);
|
||||
int32_t code = filterPartitionCond(&pScan->node.pConditions, &pPrimaryKeyCond, &pScan->pTagIndexCond,
|
||||
&pScan->pTagCond, &pOtherCond);
|
||||
if (TSDB_CODE_SUCCESS == code && NULL != pScan->pTagCond) {
|
||||
code = pushDownCondOptRebuildTbanme(&pScan->pTagCond);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue