提交 8f768263 编写于 作者: wmmhello's avatar wmmhello

enable different value type of the same key in json

上级 ccbf0fdb
......@@ -760,9 +760,9 @@ int32_t tagValCompar(const void* p1, const void* p2) {
return 1;
}
if(*t1->tag == TSDB_DATA_TYPE_BIGINT && *t2->tag == TSDB_DATA_TYPE_DOUBLE){
DEFAULT_DOUBLE_COMP(GET_INT64_VAL(t1->tag + CHAR_BYTES), GET_DOUBLE_VAL(t2->tag + CHAR_BYTES));
DEFAULT_COMP(GET_INT64_VAL(t1->tag + CHAR_BYTES), GET_DOUBLE_VAL(t2->tag + CHAR_BYTES));
}else if(*t1->tag == TSDB_DATA_TYPE_DOUBLE && *t2->tag == TSDB_DATA_TYPE_BIGINT){
DEFAULT_DOUBLE_COMP(GET_DOUBLE_VAL(t1->tag + CHAR_BYTES), GET_INT64_VAL(t2->tag + CHAR_BYTES));
DEFAULT_COMP(GET_DOUBLE_VAL(t1->tag + CHAR_BYTES), GET_INT64_VAL(t2->tag + CHAR_BYTES));
}
__compar_fn_t func = getComparFunc(t1->tag[0], 0);
......
......@@ -391,9 +391,9 @@ int32_t columnValueAscendingComparator(char *f1, char *f2, int32_t type, int32_t
return 1;
}
if(*f1 == TSDB_DATA_TYPE_BIGINT && *f2 == TSDB_DATA_TYPE_DOUBLE){
DEFAULT_DOUBLE_COMP(GET_INT64_VAL(f1 + CHAR_BYTES), GET_DOUBLE_VAL(f2 + CHAR_BYTES));
DEFAULT_COMP(GET_INT64_VAL(f1 + CHAR_BYTES), GET_DOUBLE_VAL(f2 + CHAR_BYTES));
}else if(*f1 == TSDB_DATA_TYPE_DOUBLE && *f2 == TSDB_DATA_TYPE_BIGINT){
DEFAULT_DOUBLE_COMP(GET_DOUBLE_VAL(f1 + CHAR_BYTES), GET_INT64_VAL(f2 + CHAR_BYTES));
DEFAULT_COMP(GET_DOUBLE_VAL(f1 + CHAR_BYTES), GET_INT64_VAL(f2 + CHAR_BYTES));
}
type = *f1;
f1 += CHAR_BYTES;
......
......@@ -639,9 +639,9 @@ int32_t doCompare(const char* f1, const char* f2, int32_t type, size_t size) {
return 1;
}
if(*f1 == TSDB_DATA_TYPE_BIGINT && *f2 == TSDB_DATA_TYPE_DOUBLE){
DEFAULT_DOUBLE_COMP(GET_INT64_VAL(f1 + CHAR_BYTES), GET_DOUBLE_VAL(f2 + CHAR_BYTES));
DEFAULT_COMP(GET_INT64_VAL(f1 + CHAR_BYTES), GET_DOUBLE_VAL(f2 + CHAR_BYTES));
}else if(*f1 == TSDB_DATA_TYPE_DOUBLE && *f2 == TSDB_DATA_TYPE_BIGINT){
DEFAULT_DOUBLE_COMP(GET_DOUBLE_VAL(f1 + CHAR_BYTES), GET_INT64_VAL(f2 + CHAR_BYTES));
DEFAULT_COMP(GET_DOUBLE_VAL(f1 + CHAR_BYTES), GET_INT64_VAL(f2 + CHAR_BYTES));
}
type = *f1;
f1 += CHAR_BYTES;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册