From 6b49d26693110381549d9b3e18c47d82e42aab73 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 24 Oct 2020 16:45:09 +0800 Subject: [PATCH] [td-1373] --- src/query/src/qExecutor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 47a5e1522f..a994f815f9 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -1410,7 +1410,9 @@ static void rowwiseApplyFunctions(SQueryRuntimeEnv *pRuntimeEnv, SDataStatis *pS item->lastKey = (QUERY_IS_ASC_QUERY(pQuery)? pDataBlockInfo->window.ekey:pDataBlockInfo->window.skey) + step; } - item->cur = tsBufGetCursor(pRuntimeEnv->pTSBuf); + if (pRuntimeEnv->pTSBuf != NULL) { + item->cur = tsBufGetCursor(pRuntimeEnv->pTSBuf); + } // todo refactor: extract method for(int32_t i = 0; i < pQuery->numOfOutput; ++i) { -- GitLab