fix(query): add a null ptr check

This commit is contained in:
Haojun Liao 2022-04-26 14:10:25 +08:00
parent 13feb7dad9
commit ab390ecee1
1 changed files with 3 additions and 3 deletions

View File

@ -4678,10 +4678,10 @@ _error:
int32_t getTableScanOrder(SOperatorInfo* pOperator) {
if (pOperator->operatorType != QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN) {
if (pOperator->pDownstream[0] != NULL) {
return getTableScanOrder(pOperator->pDownstream[0]);
} else {
if (pOperator->pDownstream == NULL || pOperator->pDownstream[0] == NULL) {
return TSDB_ORDER_ASC;
} else {
return getTableScanOrder(pOperator->pDownstream[0]);
}
}