Skip to content

Commit

Permalink
enh:[TD-32161] Add param check in filter.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon9997 committed Nov 8, 2024
1 parent 8e2a546 commit e1bc351
Show file tree
Hide file tree
Showing 4 changed files with 1,013 additions and 566 deletions.
4 changes: 4 additions & 0 deletions include/util/tutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ static FORCE_INLINE int32_t taosGetTbHashVal(const char *tbname, int32_t tblen,

#define SCL_CHECK_CONDITION QUERY_CHECK_CONDITION

#define FLT_CHECK_NULL TSDB_CHECK_NULL

#define FLT_CHECK_CONDITION QUERY_CHECK_CONDITION

#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))

#define VND_CHECK_CODE(CODE, LINO, LABEL) TSDB_CHECK_CODE(CODE, LINO, LABEL)
Expand Down
4 changes: 2 additions & 2 deletions source/common/src/ttypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ int32_t operateVal(void *dst, void *s1, void *s2, int32_t optr, int32_t type) {
SET_DOUBLE_VAL(dst, GET_DOUBLE_VAL(s1) + GET_DOUBLE_VAL(s2));
break;
default: {
return -1;
return TSDB_CODE_QRY_FILTER_NOT_SUPPORT_TYPE;
}
}
} else {
return -1;
return TSDB_CODE_QRY_FILTER_WRONG_OPTR_TYPE;
}

return 0;
Expand Down
Loading

0 comments on commit e1bc351

Please sign in to comment.