提交 3b89aa20 编写于 作者: dengyihao's avatar dengyihao

fix filter err

...@@ -477,56 +477,61 @@ static FORCE_INLINE FilterFunc sifGetFilterFunc(EIndexQueryType type, bool *reve ...@@ -477,56 +477,61 @@ static FORCE_INLINE FilterFunc sifGetFilterFunc(EIndexQueryType type, bool *reve
static void sifSetFltParam(SIFParam *left, SIFParam *right, SDataTypeBuf *typedata, SMetaFltParam *param) { static void sifSetFltParam(SIFParam *left, SIFParam *right, SDataTypeBuf *typedata, SMetaFltParam *param) {
int8_t ltype = left->colValType, rtype = right->colValType; int8_t ltype = left->colValType, rtype = right->colValType;
if (ltype == TSDB_DATA_TYPE_FLOAT) { if (!IS_VAR_DATA_TYPE(ltype) && IS_VAR_DATA_TYPE(rtype)) {
float f = 0; } else if (IS_VAR_DATA_TYPE(ltype) && !IS_VAR_DATA_TYPE(rtype)) {
SIF_DATA_CONVERT(rtype, right->condValue, f); return;
typedata->f = f; } else if (!IS_VAR_DATA_TYPE(ltype) && !IS_VAR_DATA_TYPE(rtype)) {
param->val = &typedata->f; if (ltype == TSDB_DATA_TYPE_FLOAT) {
} else if (ltype == TSDB_DATA_TYPE_DOUBLE) { float f = 0;
double d = 0; SIF_DATA_CONVERT(rtype, right->condValue, f);
SIF_DATA_CONVERT(rtype, right->condValue, d); typedata->f = f;
typedata->d = d; param->val = &typedata->f;
param->val = &typedata->d; } else if (ltype == TSDB_DATA_TYPE_DOUBLE) {
} else if (ltype == TSDB_DATA_TYPE_BIGINT) { double d = 0;
int64_t i64 = 0; SIF_DATA_CONVERT(rtype, right->condValue, d);
SIF_DATA_CONVERT(rtype, right->condValue, i64); typedata->d = d;
typedata->i64 = i64; param->val = &typedata->d;
param->val = &typedata->i64; } else if (ltype == TSDB_DATA_TYPE_BIGINT) {
} else if (ltype == TSDB_DATA_TYPE_INT) { int64_t i64 = 0;
int32_t i32 = 0; SIF_DATA_CONVERT(rtype, right->condValue, i64);
SIF_DATA_CONVERT(rtype, right->condValue, i32); typedata->i64 = i64;
typedata->i32 = i32; param->val = &typedata->i64;
param->val = &typedata->i32; } else if (ltype == TSDB_DATA_TYPE_INT) {
} else if (ltype == TSDB_DATA_TYPE_SMALLINT) { int32_t i32 = 0;
int16_t i16 = 0; SIF_DATA_CONVERT(rtype, right->condValue, i32);
SIF_DATA_CONVERT(rtype, right->condValue, i16); typedata->i32 = i32;
typedata->i16 = i16; param->val = &typedata->i32;
param->val = &typedata->i16; } else if (ltype == TSDB_DATA_TYPE_SMALLINT) {
} else if (ltype == TSDB_DATA_TYPE_TINYINT) { int16_t i16 = 0;
int8_t i8 = 0; SIF_DATA_CONVERT(rtype, right->condValue, i16);
SIF_DATA_CONVERT(rtype, right->condValue, i8) typedata->i16 = i16;
typedata->i8 = i8; param->val = &typedata->i16;
param->val = &typedata->i8; } else if (ltype == TSDB_DATA_TYPE_TINYINT) {
} else if (ltype == TSDB_DATA_TYPE_UBIGINT) { int8_t i8 = 0;
uint64_t u64 = 0; SIF_DATA_CONVERT(rtype, right->condValue, i8)
SIF_DATA_CONVERT(rtype, right->condValue, u64); typedata->i8 = i8;
typedata->u64 = u64; param->val = &typedata->i8;
param->val = &typedata->u64; } else if (ltype == TSDB_DATA_TYPE_UBIGINT) {
} else if (ltype == TSDB_DATA_TYPE_UINT) { uint64_t u64 = 0;
uint32_t u32 = 0; SIF_DATA_CONVERT(rtype, right->condValue, u64);
SIF_DATA_CONVERT(rtype, right->condValue, u32); typedata->u64 = u64;
typedata->u32 = u32; param->val = &typedata->u64;
param->val = &typedata->u32; } else if (ltype == TSDB_DATA_TYPE_UINT) {
} else if (ltype == TSDB_DATA_TYPE_USMALLINT) { uint32_t u32 = 0;
uint16_t u16 = 0; SIF_DATA_CONVERT(rtype, right->condValue, u32);
SIF_DATA_CONVERT(rtype, right->condValue, u16); typedata->u32 = u32;
typedata->u16 = u16; param->val = &typedata->u32;
param->val = &typedata->u16; } else if (ltype == TSDB_DATA_TYPE_USMALLINT) {
} else if (ltype == TSDB_DATA_TYPE_UTINYINT) { uint16_t u16 = 0;
uint8_t u8 = 0; SIF_DATA_CONVERT(rtype, right->condValue, u16);
SIF_DATA_CONVERT(rtype, right->condValue, u8); typedata->u16 = u16;
typedata->u8 = u8; param->val = &typedata->u16;
param->val = &typedata->u8; } else if (ltype == TSDB_DATA_TYPE_UTINYINT) {
uint8_t u8 = 0;
SIF_DATA_CONVERT(rtype, right->condValue, u8);
typedata->u8 = u8;
param->val = &typedata->u8;
}
} }
} }
static int32_t sifDoIndex(SIFParam *left, SIFParam *right, int8_t operType, SIFParam *output) { static int32_t sifDoIndex(SIFParam *left, SIFParam *right, int8_t operType, SIFParam *output) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部