[td-1322]

This commit is contained in:
Haojun Liao 2020-09-03 17:05:07 +08:00
parent ec56739527
commit 19b0a7ccb7
1 changed files with 7 additions and 2 deletions

View File

@ -154,9 +154,14 @@ int32_t tBucketBigIntHash(tMemBucket *pBucket, const void *value) {
// todo refactor to more generic
int32_t tBucketIntHash(tMemBucket *pBucket, const void *value) {
int32_t v = *(int32_t *)value;
int32_t index = -1;
int32_t v = 0;
switch(pBucket->type) {
case TSDB_DATA_TYPE_SMALLINT: v = *(int16_t*) value; break;
case TSDB_DATA_TYPE_TINYINT: v = *(int8_t*) value; break;
default: v = *(int32_t*) value;break;
}
int32_t index = -1;
if (pBucket->range.iMaxVal == INT32_MIN) {
/*
* taking negative integer into consideration,