提交 ce5aae6c 编写于 作者: X xywang

[TS-1318]<fix>: changed scan operator in real subqueries

上级 ed2768bf
......@@ -662,6 +662,7 @@ static int32_t tscLaunchRealSubqueries(SSqlObj* pSql) {
} else {
filterVgroupTables(pQueryInfo, pTableMetaInfo->pVgroupTables);
}
pQueryInfo->stableQuery = true;
}
subquerySetState(pNew, &pSql->subState, i, 0);
......
......@@ -394,7 +394,7 @@ bool tscIsPointInterpQuery(SQueryInfo* pQueryInfo) {
}
bool tscNeedTableSeqScan(SQueryInfo* pQueryInfo) {
return pQueryInfo->stableQuery && (tscQueryContainsFunction(pQueryInfo, TSDB_FUNC_TWA) || tscQueryContainsFunction(pQueryInfo, TSDB_FUNC_ELAPSED));
return pQueryInfo->stableQuery && (tscQueryContainsFunction(pQueryInfo, TSDB_FUNC_TWA) || tscQueryContainsFunction(pQueryInfo, TSDB_FUNC_ELAPSED) || (pQueryInfo->tsBuf != NULL));
}
bool tscGetPointInterpQuery(SQueryInfo* pQueryInfo) {
......
......@@ -4832,7 +4832,7 @@ static int32_t setupQueryHandle(void* tsdb, SQueryRuntimeEnv* pRuntimeEnv, int64
}
STsdbQueryCond cond = createTsdbQueryCond(pQueryAttr, &pQueryAttr->window);
if (pQueryAttr->tsCompQuery || pQueryAttr->pointInterpQuery) {
if (pQueryAttr->tsCompQuery || pQueryAttr->pointInterpQuery || pQueryAttr->needTableSeqScan) {
cond.type = BLOCK_LOAD_TABLE_SEQ_ORDER;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册