From 6bb6ea469b783fa1646f014c78ff171aa1dcfdb6 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Tue, 28 Apr 2020 14:55:46 +0800 Subject: [PATCH] [td-186] fix bug that super table uid is always set to be -1. --- src/query/src/queryExecutor.c | 2 -- src/vnode/src/vnodeWrite.c | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/query/src/queryExecutor.c b/src/query/src/queryExecutor.c index b13d129c8c..e626de6243 100644 --- a/src/query/src/queryExecutor.c +++ b/src/query/src/queryExecutor.c @@ -6099,9 +6099,7 @@ int32_t qCreateQueryInfo(void *tsdb, SQueryTableMsg *pQueryMsg, qinfo_t *pQInfo) if ((pQueryMsg->queryType & TSDB_QUERY_TYPE_STABLE_QUERY) != 0) { isSTableQuery = true; - STableId *id = taosArrayGet(pTableIdList, 0); - id->uid = -1; // todo fix me // group by normal column, do not pass the group by condition to tsdb to group table into different group int32_t numOfGroupByCols = pQueryMsg->numOfGroupCols; diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index 81cba7b6fa..02743c3e5d 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -135,7 +135,8 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe } tsdbTableSetTagSchema(&tCfg, pDestTagSchema, false); tsdbTableSetSName(&tCfg, pTable->superTableId, false); - + tsdbTableSetSuperUid(&tCfg, htobe64(pTable->superTableUid)); + char *pTagData = pTable->data + totalCols * sizeof(SSchema); int accumBytes = 0; SDataRow dataRow = tdNewDataRowFromSchema(pDestTagSchema); -- GitLab