remove some unused code
This commit is contained in:
parent
d414fed086
commit
c214e229cb
|
@ -186,8 +186,6 @@ bool tSkipListRemove(tSkipList *pSkipList, tSkipListKey *pKey);
|
||||||
*/
|
*/
|
||||||
void tSkipListRemoveNode(tSkipList *pSkipList, tSkipListNode *pNode);
|
void tSkipListRemoveNode(tSkipList *pSkipList, tSkipListNode *pNode);
|
||||||
|
|
||||||
int32_t tSkipListDefaultCompare(tSkipList *pSkipList, tSkipListKey *a, tSkipListKey *b);
|
|
||||||
|
|
||||||
// for debug purpose only
|
// for debug purpose only
|
||||||
void tSkipListPrint(tSkipList *pSkipList, int16_t nlevel);
|
void tSkipListPrint(tSkipList *pSkipList, int16_t nlevel);
|
||||||
|
|
||||||
|
|
|
@ -805,41 +805,3 @@ int32_t tSkipListPointQuery(tSkipList *pSkipList, tSkipListKey *pKey, int32_t nu
|
||||||
return retLen;
|
return retLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t tSkipListDefaultCompare(tSkipList *pSkipList, tSkipListKey *a, tSkipListKey *b) {
|
|
||||||
switch (pSkipList->keyType) {
|
|
||||||
case TSDB_DATA_TYPE_TINYINT:
|
|
||||||
case TSDB_DATA_TYPE_SMALLINT:
|
|
||||||
case TSDB_DATA_TYPE_INT:
|
|
||||||
case TSDB_DATA_TYPE_BIGINT:
|
|
||||||
case TSDB_DATA_TYPE_BOOL: {
|
|
||||||
if (a->i64Key == b->i64Key) {
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
return a->i64Key > b->i64Key ? 1 : -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
case TSDB_DATA_TYPE_FLOAT:
|
|
||||||
case TSDB_DATA_TYPE_DOUBLE: {
|
|
||||||
if (fabs(a->dKey - b->dKey) < FLT_EPSILON) {
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
return a->dKey > b->dKey ? 1 : -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
case TSDB_DATA_TYPE_BINARY: {
|
|
||||||
if (a->nLen == b->nLen) {
|
|
||||||
int32_t ret = strncmp(a->pz, b->pz, a->nLen);
|
|
||||||
if (ret == 0) {
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
return ret > 0 ? 1 : -1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return a->nLen > b->nLen ? 1 : -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue