提交 f09cb2e6 编写于 作者: wmmhello's avatar wmmhello

fix ci error in windows

上级 509845f5
...@@ -2964,7 +2964,7 @@ static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows, ...@@ -2964,7 +2964,7 @@ static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows,
if (!colData){ // for json->'key' is null if (!colData){ // for json->'key' is null
(*p)[i] = 1; (*p)[i] = 1;
}else if( *(char*)colData == TSDB_DATA_TYPE_JSON){ // for json is null }else if( *(char*)colData == TSDB_DATA_TYPE_JSON){ // for json is null
colData += CHAR_BYTES; colData = POINTER_SHIFT(colData, CHAR_BYTES);
(*p)[i] = isNull(colData, info->cunits[uidx].dataType); (*p)[i] = isNull(colData, info->cunits[uidx].dataType);
}else{ }else{
(*p)[i] = 0; (*p)[i] = 0;
...@@ -2999,7 +2999,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows ...@@ -2999,7 +2999,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
if (!colData) { // for json->'key' is not null if (!colData) { // for json->'key' is not null
(*p)[i] = 0; (*p)[i] = 0;
}else if( *(char*)colData == TSDB_DATA_TYPE_JSON){ // for json is not null }else if( *(char*)colData == TSDB_DATA_TYPE_JSON){ // for json is not null
colData += CHAR_BYTES; colData = POINTER_SHIFT(colData, CHAR_BYTES);
(*p)[i] = !isNull(colData, info->cunits[uidx].dataType); (*p)[i] = !isNull(colData, info->cunits[uidx].dataType);
}else{ // for json->'key' is not null }else{ // for json->'key' is not null
(*p)[i] = 1; (*p)[i] = 1;
...@@ -3019,7 +3019,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows ...@@ -3019,7 +3019,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
static void doJsonCompare(SFilterComUnit *cunit, int8_t *result, void* colData){ static void doJsonCompare(SFilterComUnit *cunit, int8_t *result, void* colData){
if(cunit->optr == TSDB_RELATION_MATCH || cunit->optr == TSDB_RELATION_NMATCH){ if(cunit->optr == TSDB_RELATION_MATCH || cunit->optr == TSDB_RELATION_NMATCH){
uint8_t jsonType = *(char*)colData; uint8_t jsonType = *(char*)colData;
char* realData = colData + CHAR_BYTES; char* realData = POINTER_SHIFT(colData, CHAR_BYTES);
if (jsonType != TSDB_DATA_TYPE_NCHAR){ if (jsonType != TSDB_DATA_TYPE_NCHAR){
*result = false; *result = false;
}else{ }else{
...@@ -3036,7 +3036,7 @@ static void doJsonCompare(SFilterComUnit *cunit, int8_t *result, void* colData){ ...@@ -3036,7 +3036,7 @@ static void doJsonCompare(SFilterComUnit *cunit, int8_t *result, void* colData){
} }
}else if(cunit->optr == TSDB_RELATION_LIKE){ }else if(cunit->optr == TSDB_RELATION_LIKE){
uint8_t jsonType = *(char*)colData; uint8_t jsonType = *(char*)colData;
char* realData = colData + CHAR_BYTES; char* realData = POINTER_SHIFT(colData, CHAR_BYTES);
if (jsonType != TSDB_DATA_TYPE_NCHAR){ if (jsonType != TSDB_DATA_TYPE_NCHAR){
*result = false; *result = false;
}else{ }else{
......
...@@ -3559,8 +3559,8 @@ static int32_t tableGroupComparFn(const void *p1, const void *p2, const void *pa ...@@ -3559,8 +3559,8 @@ static int32_t tableGroupComparFn(const void *p1, const void *p2, const void *pa
bytes = pCol->bytes; bytes = pCol->bytes;
type = pCol->type; type = pCol->type;
if (type == TSDB_DATA_TYPE_JSON){ if (type == TSDB_DATA_TYPE_JSON){
f1 = getJsonTagValueElment(pTable1, pColIndex->name, strlen(pColIndex->name), NULL, TSDB_MAX_JSON_TAGS_LEN); f1 = getJsonTagValueElment(pTable1, pColIndex->name, (int32_t)strlen(pColIndex->name), NULL, TSDB_MAX_JSON_TAGS_LEN);
f2 = getJsonTagValueElment(pTable2, pColIndex->name, strlen(pColIndex->name), NULL, TSDB_MAX_JSON_TAGS_LEN); f2 = getJsonTagValueElment(pTable2, pColIndex->name, (int32_t)strlen(pColIndex->name), NULL, TSDB_MAX_JSON_TAGS_LEN);
}else{ }else{
f1 = tdGetKVRowValOfCol(pTable1->tagVal, pCol->colId); f1 = tdGetKVRowValOfCol(pTable1->tagVal, pCol->colId);
f2 = tdGetKVRowValOfCol(pTable2->tagVal, pCol->colId); f2 = tdGetKVRowValOfCol(pTable2->tagVal, pCol->colId);
...@@ -4110,7 +4110,7 @@ static int32_t queryByJsonTag(STable* pTable, void* filterInfo, SArray* res){ ...@@ -4110,7 +4110,7 @@ static int32_t queryByJsonTag(STable* pTable, void* filterInfo, SArray* res){
tsdbError("json key not exist, no candidate table"); tsdbError("json key not exist, no candidate table");
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
int32_t size = taosArrayGetSize(tabList); size_t size = taosArrayGetSize(tabList);
int8_t *addToResult = NULL; int8_t *addToResult = NULL;
for(int i = 0; i < size; i++){ for(int i = 0; i < size; i++){
JsonMapValue* data = taosArrayGet(tabList, i); JsonMapValue* data = taosArrayGet(tabList, i);
...@@ -4155,7 +4155,7 @@ void* getJsonTagValueElment(void* data, char* key, int32_t keyLen, char* dst, in ...@@ -4155,7 +4155,7 @@ void* getJsonTagValueElment(void* data, char* key, int32_t keyLen, char* dst, in
void* result = tsdbGetJsonTagValue(data, keyMd5, TSDB_MAX_JSON_KEY_MD5_LEN, NULL); void* result = tsdbGetJsonTagValue(data, keyMd5, TSDB_MAX_JSON_KEY_MD5_LEN, NULL);
if (result == NULL){ // json key no result if (result == NULL){ // json key no result
if(!dst) return NULL; if(!dst) return NULL;
*(char*)dst = TSDB_DATA_TYPE_JSON; *dst = TSDB_DATA_TYPE_JSON;
setNull(dst + CHAR_BYTES, TSDB_DATA_TYPE_JSON, 0); setNull(dst + CHAR_BYTES, TSDB_DATA_TYPE_JSON, 0);
return dst; return dst;
} }
...@@ -4182,7 +4182,7 @@ void* getJsonTagValueElment(void* data, char* key, int32_t keyLen, char* dst, in ...@@ -4182,7 +4182,7 @@ void* getJsonTagValueElment(void* data, char* key, int32_t keyLen, char* dst, in
void getJsonTagValueAll(void* data, void* dst, int16_t bytes) { void getJsonTagValueAll(void* data, void* dst, int16_t bytes) {
char* json = parseTagDatatoJson(data); char* json = parseTagDatatoJson(data);
char* tagData = dst + CHAR_BYTES; char* tagData = POINTER_SHIFT(dst, CHAR_BYTES);
*(char*)dst = TSDB_DATA_TYPE_JSON; *(char*)dst = TSDB_DATA_TYPE_JSON;
if(json == NULL){ if(json == NULL){
setNull(tagData, TSDB_DATA_TYPE_JSON, 0); setNull(tagData, TSDB_DATA_TYPE_JSON, 0);
...@@ -4267,7 +4267,7 @@ char* parseTagDatatoJson(void *p){ ...@@ -4267,7 +4267,7 @@ char* parseTagDatatoJson(void *p){
cJSON_AddItemToObject(json, tagJsonKey, value); cJSON_AddItemToObject(json, tagJsonKey, value);
}else if(type == TSDB_DATA_TYPE_BIGINT){ }else if(type == TSDB_DATA_TYPE_BIGINT){
int64_t jsonVd = *(int64_t*)(realData); int64_t jsonVd = *(int64_t*)(realData);
cJSON* value = cJSON_CreateNumber(jsonVd); cJSON* value = cJSON_CreateNumber((double)jsonVd);
if (value == NULL) if (value == NULL)
{ {
goto end; goto end;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册