提交 bd6cde63 编写于 作者: S Shengliang Guan

sma

上级 ec790acc
...@@ -88,7 +88,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) { ...@@ -88,7 +88,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) {
SDB_SET_INT32(pRaw, dataPos, pStb->nextColId, STB_ENCODE_OVER) 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->numOfColumns, STB_ENCODE_OVER)
SDB_SET_INT32(pRaw, dataPos, pStb->numOfTags, 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) { for (int32_t i = 0; i < pStb->numOfColumns; ++i) {
SSchema *pSchema = &pStb->pColumns[i]; SSchema *pSchema = &pStb->pColumns[i];
...@@ -106,23 +105,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) { ...@@ -106,23 +105,6 @@ SSdbRaw *mndStbActionEncode(SStbObj *pStb) {
SDB_SET_BINARY(pRaw, dataPos, pSchema->name, TSDB_COL_NAME_LEN, STB_ENCODE_OVER) 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_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_RESERVE(pRaw, dataPos, TSDB_STB_RESERVE_SIZE, STB_ENCODE_OVER)
SDB_SET_DATALEN(pRaw, dataPos, STB_ENCODE_OVER) SDB_SET_DATALEN(pRaw, dataPos, STB_ENCODE_OVER)
...@@ -168,7 +150,6 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) { ...@@ -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->nextColId, STB_DECODE_OVER)
SDB_GET_INT32(pRaw, dataPos, &pStb->numOfColumns, 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->numOfTags, STB_DECODE_OVER)
SDB_GET_INT32(pRaw, dataPos, &pStb->numOfTSmas, STB_DECODE_OVER)
pStb->pColumns = calloc(pStb->numOfColumns, sizeof(SSchema)); pStb->pColumns = calloc(pStb->numOfColumns, sizeof(SSchema));
pStb->pTags = calloc(pStb->numOfTags, sizeof(SSchema)); pStb->pTags = calloc(pStb->numOfTags, sizeof(SSchema));
...@@ -192,23 +173,6 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) { ...@@ -192,23 +173,6 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) {
SDB_GET_BINARY(pRaw, dataPos, pSchema->name, TSDB_COL_NAME_LEN, STB_DECODE_OVER) 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_BINARY(pRaw, dataPos, pStb->comment, TSDB_STB_COMMENT_LEN, STB_DECODE_OVER)
SDB_GET_RESERVE(pRaw, dataPos, TSDB_STB_RESERVE_SIZE, STB_DECODE_OVER) SDB_GET_RESERVE(pRaw, dataPos, TSDB_STB_RESERVE_SIZE, STB_DECODE_OVER)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册