diff --git a/src/system/detail/inc/vnodeTagMgmt.h b/src/system/detail/inc/vnodeTagMgmt.h index 02d9779d159e313528258e5cd492f1e126d81e3d..b801d1c5412d68ff52fc5e9c0ad33b8b23a6a469 100644 --- a/src/system/detail/inc/vnodeTagMgmt.h +++ b/src/system/detail/inc/vnodeTagMgmt.h @@ -32,15 +32,6 @@ extern "C" { * Note: * 1. we implement a quick sort algorithm, may remove it later. */ - -//typedef struct tTagSchema { -// struct SSchema *pSchema; -// int32_t numOfCols; -// int32_t colOffset[]; -//} tTagSchema; - -typedef SColumnModel tTagSchema; - typedef struct tSidSet { int32_t numOfSids; int32_t numOfSubSet; @@ -56,8 +47,6 @@ typedef int32_t (*__ext_compar_fn_t)(const void *p1, const void *p2, void *param tSidSet *tSidSetCreate(struct SMeterSidExtInfo **pMeterSidExtInfo, int32_t numOfMeters, SSchema *pSchema, int32_t numOfTags, SColIndexEx *colList, int32_t numOfOrderCols); -//tTagSchema *tCreateTagSchema(SSchema *pSchema, int32_t numOfTagCols); - int32_t *calculateSubGroup(void **pSids, int32_t numOfMeters, int32_t *numOfSubset, tOrderDescriptor *pOrderDesc, __ext_compar_fn_t compareFn); diff --git a/src/system/detail/src/vnodeTagMgmt.c b/src/system/detail/src/vnodeTagMgmt.c index 58d1be677a0c5707e13e5eec62336abcc1db3e0b..5585813ec377571f8415ba6b949bb158285b1d3e 100644 --- a/src/system/detail/src/vnodeTagMgmt.c +++ b/src/system/detail/src/vnodeTagMgmt.c @@ -27,7 +27,7 @@ #define GET_TAG_VAL_POINTER(s, col, sc, t) ((t *)(&((s)->tags[getColumnModelOffset(sc, col)]))) #define GET_TAG_VAL(s, col, sc, t) (*GET_TAG_VAL_POINTER(s, col, sc, t)) -static void tTagsPrints(SMeterSidExtInfo *pMeterInfo, tTagSchema *pSchema, SColumnOrderInfo *pOrder); +static void tTagsPrints(SMeterSidExtInfo *pMeterInfo, SColumnModel *pSchema, SColumnOrderInfo *pOrder); static void tSidSetDisplay(tSidSet *pSets); @@ -241,25 +241,6 @@ int32_t *calculateSubGroup(void **pSids, int32_t numOfMeters, int32_t *numOfSubs return starterPos; } -//tTagSchema *tCreateTagSchema(SSchema *pSchema, int32_t numOfTagCols) { -// if (numOfTagCols == 0 || pSchema == NULL) { -// return NULL; -// } -// -// tTagSchema *pColumnModel = -// (tTagSchema *)calloc(1, sizeof(tTagSchema) + numOfTagCols * sizeof(int32_t) + sizeof(SSchema) * numOfTagCols); -// -// pColumnModel->colOffset[0] = 0; -// pColumnModel->numOfCols = numOfTagCols; -// for (int32_t i = 1; i < numOfTagCols; ++i) { -// pColumnModel->colOffset[i] = (pColumnModel->colOffset[i - 1] + pSchema[i - 1].bytes); -// } -// -// pColumnModel->pSchema = (SSchema *)&(pColumnModel->colOffset[numOfTagCols]); -// memcpy(pColumnModel->pSchema, pSchema, sizeof(SSchema) * numOfTagCols); -// return pColumnModel; -//} - tSidSet *tSidSetCreate(struct SMeterSidExtInfo **pMeterSidExtInfo, int32_t numOfMeters, SSchema *pSchema, int32_t numOfTags, SColIndexEx *colList, int32_t numOfCols) { tSidSet *pSidSet = (tSidSet *)calloc(1, sizeof(tSidSet) + numOfCols * sizeof(int16_t)); @@ -296,7 +277,7 @@ void tSidSetDestroy(tSidSet **pSets) { } } -void tTagsPrints(SMeterSidExtInfo *pMeterInfo, tTagSchema *pSchema, SColumnOrderInfo *pOrder) { +void tTagsPrints(SMeterSidExtInfo *pMeterInfo, SColumnModel *pSchema, SColumnOrderInfo *pOrder) { if (pSchema == NULL) { return; }