提交 cfcec60f 编写于 作者: H Haojun Liao

[td-3001] <fix>: fix tag filter bug in case of unsigned number existing.

上级 c4a0b797
...@@ -297,32 +297,14 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { ...@@ -297,32 +297,14 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) {
__compar_fn_t comparFn = NULL; __compar_fn_t comparFn = NULL;
switch (type) { switch (type) {
case TSDB_DATA_TYPE_SMALLINT: {
comparFn = compareInt16Val; break;
}
case TSDB_DATA_TYPE_INT: {
comparFn = compareInt32Val; break;
}
case TSDB_DATA_TYPE_BIGINT:
case TSDB_DATA_TYPE_TIMESTAMP: {
comparFn = compareInt64Val; break;
}
case TSDB_DATA_TYPE_BOOL: case TSDB_DATA_TYPE_BOOL:
case TSDB_DATA_TYPE_TINYINT:{ case TSDB_DATA_TYPE_TINYINT: comparFn = compareInt8Val; break;
comparFn = compareInt8Val; break; case TSDB_DATA_TYPE_SMALLINT: comparFn = compareInt16Val; break;
} case TSDB_DATA_TYPE_INT: comparFn = compareInt32Val; break;
case TSDB_DATA_TYPE_BIGINT:
case TSDB_DATA_TYPE_FLOAT: { case TSDB_DATA_TYPE_TIMESTAMP: comparFn = compareInt64Val; break;
comparFn = compareFloatVal; break; case TSDB_DATA_TYPE_FLOAT: comparFn = compareFloatVal; break;
} case TSDB_DATA_TYPE_DOUBLE: comparFn = compareDoubleVal; break;
case TSDB_DATA_TYPE_DOUBLE: {
comparFn = compareDoubleVal; break;
}
case TSDB_DATA_TYPE_BINARY: { case TSDB_DATA_TYPE_BINARY: {
if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */ if (optr == TSDB_RELATION_LIKE) { /* wildcard query using like operator */
comparFn = compareStrPatternComp; comparFn = compareStrPatternComp;
...@@ -341,10 +323,14 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) { ...@@ -341,10 +323,14 @@ __compar_fn_t getComparFunc(int32_t type, int32_t optr) {
} else { } else {
comparFn = compareLenPrefixedWStr; comparFn = compareLenPrefixedWStr;
} }
break; break;
} }
case TSDB_DATA_TYPE_UTINYINT: comparFn = compareUint8Val; break;
case TSDB_DATA_TYPE_USMALLINT: comparFn = compareUint16Val;break;
case TSDB_DATA_TYPE_UINT: comparFn = compareUint32Val;break;
case TSDB_DATA_TYPE_UBIGINT: comparFn = compareUint64Val;break;
default: default:
comparFn = compareInt32Val; comparFn = compareInt32Val;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册