diff --git a/src/query/inc/qFilter.h b/src/query/inc/qFilter.h index a46ec0efa3cc108989c201765b0c78b0f966abcf..3e1109a730bbff4c2eda73e303f12c5a6a208595 100644 --- a/src/query/inc/qFilter.h +++ b/src/query/inc/qFilter.h @@ -253,9 +253,9 @@ typedef struct SFilterInfo { #define FILTER_GET_COL_FIELD_TYPE(fi) (((SSchema *)((fi)->desc))->type) #define FILTER_GET_COL_FIELD_SIZE(fi) (((SSchema *)((fi)->desc))->bytes) #define FILTER_GET_COL_FIELD_DESC(fi) ((SSchema *)((fi)->desc)) -#define FILTER_GET_COL_FIELD_DATA(fi, ri) ((fi)->data + ((SSchema *)((fi)->desc))->bytes * (ri)) +#define FILTER_GET_COL_FIELD_DATA(fi, ri) ((char *)(fi)->data + ((SSchema *)((fi)->desc))->bytes * (ri)) #define FILTER_GET_VAL_FIELD_TYPE(fi) (((tVariant *)((fi)->desc))->nType) -#define FILTER_GET_VAL_FIELD_DATA(fi) ((fi)->data) +#define FILTER_GET_VAL_FIELD_DATA(fi) ((char *)(fi)->data) #define FILTER_GET_TYPE(fl) ((fl) & FLD_TYPE_MAX) #define FILTER_GROUP_UNIT(i, g, uid) ((i)->units + (g)->unitIdxs[uid]) diff --git a/src/query/src/qFilter.c b/src/query/src/qFilter.c index 1a0eb9796a2b61165895b738725ecd3f696f9a67..4bbc9eba15c14ea3c81ae093123c9c47a2c11d9f 100644 --- a/src/query/src/qFilter.c +++ b/src/query/src/qFilter.c @@ -898,7 +898,7 @@ int32_t filterConvertSetFromBinary(void **q, const char *buf, int32_t len, uint3 if (bufLen < t) { tmp = realloc(tmp, t * TSDB_NCHAR_SIZE); - bufLen = t; + bufLen = (int32_t)t; } bool converted = false; @@ -1623,7 +1623,7 @@ int32_t filterInitValFieldData(SFilterInfo *info) { fi->data = calloc(var->nLen, tDataTypes[type].bytes); for (int32_t a = 0; a < var->nLen; ++a) { int64_t *v = taosArrayGet(var->arr, a); - assignVal(fi->data + a * tDataTypes[type].bytes, (char *)v, 0, type); + assignVal((char *)fi->data + a * tDataTypes[type].bytes, (char *)v, 0, type); } continue;