提交 ecfb830c 编写于 作者: X xywang

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

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