fix: fix asan error
This commit is contained in:
parent
ecaf5193a2
commit
cda49b559c
|
@ -3120,9 +3120,8 @@ static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows,
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfRows; ++i) {
|
for (int32_t i = 0; i < numOfRows; ++i) {
|
||||||
uint32_t uidx = info->groups[0].unitIdxs[0];
|
uint32_t uidx = info->groups[0].unitIdxs[0];
|
||||||
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
|
|
||||||
p[i] = ((colData == NULL) || colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
|
|
||||||
|
|
||||||
|
p[i] = colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL);
|
||||||
if (p[i] == 0) {
|
if (p[i] == 0) {
|
||||||
all = false;
|
all = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3146,13 +3145,8 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfRows; ++i) {
|
for (int32_t i = 0; i < numOfRows; ++i) {
|
||||||
uint32_t uidx = info->groups[0].unitIdxs[0];
|
uint32_t uidx = info->groups[0].unitIdxs[0];
|
||||||
if (((SColumnInfoData *)info->cunits[uidx].colData)->pData == NULL) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
|
p[i] = !colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL);
|
||||||
|
|
||||||
p[i] = ((colData != NULL) && !colDataIsNull((SColumnInfoData *)info->cunits[uidx].colData, 0, i, NULL));
|
|
||||||
if (p[i] == 0) {
|
if (p[i] == 0) {
|
||||||
all = false;
|
all = false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3182,13 +3176,13 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, SColumnInfoData *pRe
|
||||||
for (int32_t i = 0; i < numOfRows; ++i) {
|
for (int32_t i = 0; i < numOfRows; ++i) {
|
||||||
SColumnInfoData *pData = info->cunits[0].colData;
|
SColumnInfoData *pData = info->cunits[0].colData;
|
||||||
|
|
||||||
void *colData = colDataGetData(pData, i);
|
if (colDataIsNull_s(pData, i)) {
|
||||||
if (colData == NULL || colDataIsNull_s(pData, i)) {
|
|
||||||
all = false;
|
all = false;
|
||||||
p[i] = 0;
|
p[i] = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *colData = colDataGetData(pData, i);
|
||||||
p[i] = (*rfunc)(colData, colData, valData, valData2, func);
|
p[i] = (*rfunc)(colData, colData, valData, valData2, func);
|
||||||
|
|
||||||
if (p[i] == 0) {
|
if (p[i] == 0) {
|
||||||
|
@ -3214,13 +3208,14 @@ bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, SColumnInfoData *pRes
|
||||||
|
|
||||||
for (int32_t i = 0; i < numOfRows; ++i) {
|
for (int32_t i = 0; i < numOfRows; ++i) {
|
||||||
uint32_t uidx = info->groups[0].unitIdxs[0];
|
uint32_t uidx = info->groups[0].unitIdxs[0];
|
||||||
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
|
|
||||||
if (colData == NULL || colDataIsNull_s((SColumnInfoData *)info->cunits[uidx].colData, i)) {
|
if (colDataIsNull_s((SColumnInfoData *)info->cunits[uidx].colData, i)) {
|
||||||
p[i] = 0;
|
p[i] = 0;
|
||||||
all = false;
|
all = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *colData = colDataGetData((SColumnInfoData *)info->cunits[uidx].colData, i);
|
||||||
// match/nmatch for nchar type need convert from ucs4 to mbs
|
// match/nmatch for nchar type need convert from ucs4 to mbs
|
||||||
if (info->cunits[uidx].dataType == TSDB_DATA_TYPE_NCHAR &&
|
if (info->cunits[uidx].dataType == TSDB_DATA_TYPE_NCHAR &&
|
||||||
(info->cunits[uidx].optr == OP_TYPE_MATCH || info->cunits[uidx].optr == OP_TYPE_NMATCH)) {
|
(info->cunits[uidx].optr == OP_TYPE_MATCH || info->cunits[uidx].optr == OP_TYPE_NMATCH)) {
|
||||||
|
@ -3278,7 +3273,7 @@ bool filterExecuteImpl(void *pinfo, int32_t numOfRows, SColumnInfoData *pRes, SC
|
||||||
if (!isNull) {
|
if (!isNull) {
|
||||||
colData = colDataGetData((SColumnInfoData *)(cunit->colData), i);
|
colData = colDataGetData((SColumnInfoData *)(cunit->colData), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (colData == NULL || isNull) {
|
if (colData == NULL || isNull) {
|
||||||
p[i] = optr == OP_TYPE_IS_NULL ? true : false;
|
p[i] = optr == OP_TYPE_IS_NULL ? true : false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue