fix: error in empty string in operator
This commit is contained in:
parent
3dafc6556c
commit
8390080074
|
@ -83,6 +83,7 @@ typedef uint16_t VarDataLenT; // maxVarDataLen: 32767
|
||||||
|
|
||||||
#define varDataLen(v) ((VarDataLenT *)(v))[0]
|
#define varDataLen(v) ((VarDataLenT *)(v))[0]
|
||||||
#define varDataVal(v) ((char *)(v) + VARSTR_HEADER_SIZE)
|
#define varDataVal(v) ((char *)(v) + VARSTR_HEADER_SIZE)
|
||||||
|
#define varDataTLen(v) (sizeof(VarDataLenT) + varDataLen(v))
|
||||||
|
|
||||||
#define NCHAR_WIDTH_TO_BYTES(n) ((n) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE)
|
#define NCHAR_WIDTH_TO_BYTES(n) ((n) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE)
|
||||||
|
|
||||||
|
|
|
@ -109,9 +109,8 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_VAR_DATA_TYPE(type)) {
|
if (IS_VAR_DATA_TYPE(type)) {
|
||||||
char* data = colDataGetVarData(out.columnData, 0);
|
buf = colDataGetVarData(out.columnData, 0);
|
||||||
len = varDataLen(data);
|
len = varDataTLen(data);
|
||||||
buf = varDataVal(data);
|
|
||||||
} else {
|
} else {
|
||||||
len = tDataTypes[type].bytes;
|
len = tDataTypes[type].bytes;
|
||||||
buf = out.columnData->pData;
|
buf = out.columnData->pData;
|
||||||
|
@ -119,8 +118,7 @@ int32_t scalarGenerateSetFromList(void **data, void *pNode, uint32_t type) {
|
||||||
} else {
|
} else {
|
||||||
buf = nodesGetValueFromNode(valueNode);
|
buf = nodesGetValueFromNode(valueNode);
|
||||||
if (IS_VAR_DATA_TYPE(type)) {
|
if (IS_VAR_DATA_TYPE(type)) {
|
||||||
len = varDataLen(buf);
|
len = varDataTLen(buf);
|
||||||
buf = varDataVal(buf);
|
|
||||||
} else {
|
} else {
|
||||||
len = valueNode->node.resType.bytes;
|
len = valueNode->node.resType.bytes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,11 +56,11 @@ int32_t setChkNotInBytes8(const void *pLeft, const void *pRight) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t compareChkInString(const void *pLeft, const void *pRight) {
|
int32_t compareChkInString(const void *pLeft, const void *pRight) {
|
||||||
return NULL != taosHashGet((SHashObj *)pRight, varDataVal(pLeft), varDataLen(pLeft)) ? 1 : 0;
|
return NULL != taosHashGet((SHashObj *)pRight, pLeft, varDataTLen(pLeft)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t compareChkNotInString(const void *pLeft, const void *pRight) {
|
int32_t compareChkNotInString(const void *pLeft, const void *pRight) {
|
||||||
return NULL == taosHashGet((SHashObj *)pRight, varDataVal(pLeft), varDataLen(pLeft)) ? 1 : 0;
|
return NULL == taosHashGet((SHashObj *)pRight, pLeft, varDataTLen(pLeft)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t compareInt8Val(const void *pLeft, const void *pRight) {
|
int32_t compareInt8Val(const void *pLeft, const void *pRight) {
|
||||||
|
|
Loading…
Reference in New Issue