From a703b7024d830246ac11a10674afddddf2bbe6e1 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Fri, 28 Jan 2022 15:57:38 +0800 Subject: [PATCH] support select * from stable --- source/dnode/vnode/src/tq/tq.c | 6 +++++- source/util/src/tlog.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index ade623a736..f3163fb515 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -916,6 +916,11 @@ SArray* tqRetrieveDataBlock(STqReadHandle* pHandle) { int32_t numOfCols = pHandle->pSchema->numOfCols; int32_t colNumNeed = taosArrayGetSize(pHandle->pColIdList); + //TODO: stable case + if (colNumNeed > pSchemaWrapper->nCols) { + colNumNeed = pSchemaWrapper->nCols; + } + SArray* pArray = taosArrayInit(colNumNeed, sizeof(SColumnInfoData)); if (pArray == NULL) { return NULL; @@ -928,7 +933,6 @@ SArray* tqRetrieveDataBlock(STqReadHandle* pHandle) { j++; } SSchema* pColSchema = &pSchemaWrapper->pSchema[j]; - ASSERT(pColSchema->colId == colId); SColumnInfoData colInfo = {0}; int sz = numOfRows * pColSchema->bytes; colInfo.info.bytes = pColSchema->bytes; diff --git a/source/util/src/tlog.c b/source/util/src/tlog.c index c7b1350591..5ce69f1c2e 100644 --- a/source/util/src/tlog.c +++ b/source/util/src/tlog.c @@ -92,7 +92,7 @@ int32_t debugFlag = 0; int32_t sDebugFlag = 135; int32_t wDebugFlag = 135; int32_t tsdbDebugFlag = 131; -int32_t tqDebugFlag = 131; +int32_t tqDebugFlag = 135; int32_t cqDebugFlag = 131; int32_t fsDebugFlag = 135;