From bd6cde63cd3dbd92316b810b058a509d0b5e38c2 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 23 Mar 2022 15:03:02 +0800 Subject: [PATCH] sma --- source/dnode/mnode/impl/src/mndStb.c | 36 ---------------------------- 1 file changed, 36 deletions(-) diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 8ad3135ab0..99b7154c3f 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -88,7 +88,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) { SDB_SET_INT32(pRaw, dataPos, pStb->nextColId, STB_ENCODE_OVER) SDB_SET_INT32(pRaw, dataPos, pStb->numOfColumns, STB_ENCODE_OVER) SDB_SET_INT32(pRaw, dataPos, pStb->numOfTags, STB_ENCODE_OVER) - SDB_SET_INT32(pRaw, dataPos, pStb->numOfTSmas, STB_ENCODE_OVER) for (int32_t i = 0; i < pStb->numOfColumns; ++i) { SSchema *pSchema = &pStb->pColumns[i]; @@ -106,23 +105,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) { SDB_SET_BINARY(pRaw, dataPos, pSchema->name, TSDB_COL_NAME_LEN, STB_ENCODE_OVER) } - for (int32_t i = 0; i < pStb->numOfTSmas; ++i) { - STSmaObj *pTSma = &pStb->pTSmas[i]; - SDB_SET_BINARY(pRaw, dataPos, pTSma->name, TSDB_TABLE_FNAME_LEN, STB_ENCODE_OVER) - SDB_SET_INT64(pRaw, dataPos, pTSma->createdTime, STB_ENCODE_OVER) - SDB_SET_INT64(pRaw, dataPos, pTSma->uid, STB_ENCODE_OVER) - SDB_SET_INT8(pRaw, dataPos, pTSma->intervalUnit, STB_ENCODE_OVER) - SDB_SET_INT8(pRaw, dataPos, pTSma->slidingUnit, STB_ENCODE_OVER) - SDB_SET_INT8(pRaw, dataPos, pTSma->timezone, STB_ENCODE_OVER) - SDB_SET_INT64(pRaw, dataPos, pTSma->interval, STB_ENCODE_OVER) - SDB_SET_INT64(pRaw, dataPos, pTSma->offset, STB_ENCODE_OVER) - SDB_SET_INT64(pRaw, dataPos, pTSma->sliding, STB_ENCODE_OVER) - SDB_SET_INT32(pRaw, dataPos, pTSma->exprLen, STB_ENCODE_OVER) - SDB_SET_INT32(pRaw, dataPos, pTSma->tagsFilterLen, STB_ENCODE_OVER) - SDB_SET_BINARY(pRaw, dataPos, pTSma->expr, pTSma->exprLen, STB_ENCODE_OVER) - SDB_SET_BINARY(pRaw, dataPos, pTSma->tagsFilter, pTSma->tagsFilterLen, STB_ENCODE_OVER) - } - SDB_SET_BINARY(pRaw, dataPos, pStb->comment, TSDB_STB_COMMENT_LEN, STB_ENCODE_OVER) SDB_SET_RESERVE(pRaw, dataPos, TSDB_STB_RESERVE_SIZE, STB_ENCODE_OVER) SDB_SET_DATALEN(pRaw, dataPos, STB_ENCODE_OVER) @@ -168,7 +150,6 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) { SDB_GET_INT32(pRaw, dataPos, &pStb->nextColId, STB_DECODE_OVER) SDB_GET_INT32(pRaw, dataPos, &pStb->numOfColumns, STB_DECODE_OVER) SDB_GET_INT32(pRaw, dataPos, &pStb->numOfTags, STB_DECODE_OVER) - SDB_GET_INT32(pRaw, dataPos, &pStb->numOfTSmas, STB_DECODE_OVER) pStb->pColumns = calloc(pStb->numOfColumns, sizeof(SSchema)); pStb->pTags = calloc(pStb->numOfTags, sizeof(SSchema)); @@ -192,23 +173,6 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) { SDB_GET_BINARY(pRaw, dataPos, pSchema->name, TSDB_COL_NAME_LEN, STB_DECODE_OVER) } - for (int32_t i = 0; i < pStb->numOfTSmas; ++i) { - STSmaObj *pTSma = &pStb->pTSmas[i]; - SDB_GET_BINARY(pRaw, dataPos, pTSma->name, TSDB_TABLE_FNAME_LEN, STB_DECODE_OVER) - SDB_GET_INT64(pRaw, dataPos, &pTSma->createdTime, STB_DECODE_OVER) - SDB_GET_INT64(pRaw, dataPos, &pTSma->uid, STB_DECODE_OVER) - SDB_GET_INT8(pRaw, dataPos, &pTSma->intervalUnit, STB_DECODE_OVER) - SDB_GET_INT8(pRaw, dataPos, &pTSma->slidingUnit, STB_DECODE_OVER) - SDB_GET_INT8(pRaw, dataPos, &pTSma->timezone, STB_DECODE_OVER) - SDB_GET_INT64(pRaw, dataPos, &pTSma->interval, STB_DECODE_OVER) - SDB_GET_INT64(pRaw, dataPos, &pTSma->offset, STB_DECODE_OVER) - SDB_GET_INT64(pRaw, dataPos, &pTSma->sliding, STB_DECODE_OVER) - SDB_GET_INT32(pRaw, dataPos, &pTSma->exprLen, STB_DECODE_OVER) - SDB_GET_INT32(pRaw, dataPos, &pTSma->tagsFilterLen, STB_DECODE_OVER) - SDB_GET_BINARY(pRaw, dataPos, pTSma->expr, pTSma->exprLen, STB_DECODE_OVER) - SDB_GET_BINARY(pRaw, dataPos, pTSma->tagsFilter, pTSma->tagsFilterLen, STB_DECODE_OVER) - } - SDB_GET_BINARY(pRaw, dataPos, pStb->comment, TSDB_STB_COMMENT_LEN, STB_DECODE_OVER) SDB_GET_RESERVE(pRaw, dataPos, TSDB_STB_RESERVE_SIZE, STB_DECODE_OVER) -- GitLab