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

refactor: fix error in schemaless

上级 140c319e
...@@ -200,18 +200,17 @@ typedef struct SExprInfo { ...@@ -200,18 +200,17 @@ typedef struct SExprInfo {
} SExprInfo; } SExprInfo;
typedef struct { typedef struct {
const char* key; const char* key;
int32_t keyLen; int32_t keyLen;
uint8_t type; uint8_t type;
int16_t length;
union{ union{
const char* value; const char* value;
int64_t i; int64_t i;
uint64_t u; uint64_t u;
double d; double d;
float f; float f;
}; };
int32_t valueLen; int32_t length;
} SSmlKv; } SSmlKv;
#define QUERY_ASC_FORWARD_STEP 1 #define QUERY_ASC_FORWARD_STEP 1
......
...@@ -317,7 +317,11 @@ void buildChildTableName(RandTableName* rName) { ...@@ -317,7 +317,11 @@ void buildChildTableName(RandTableName* rName) {
for (int j = 0; j < size; ++j) { for (int j = 0; j < size; ++j) {
SSmlKv* tagKv = taosArrayGetP(rName->tags, j); SSmlKv* tagKv = taosArrayGetP(rName->tags, j);
taosStringBuilderAppendStringLen(&sb, tagKv->key, tagKv->keyLen); taosStringBuilderAppendStringLen(&sb, tagKv->key, tagKv->keyLen);
taosStringBuilderAppendStringLen(&sb, tagKv->value, tagKv->length); if(IS_VAR_DATA_TYPE(tagKv->type)){
taosStringBuilderAppendStringLen(&sb, tagKv->value, tagKv->length);
}else{
taosStringBuilderAppendStringLen(&sb, (char*)(&(tagKv->value)), tagKv->length);
}
} }
size_t len = 0; size_t len = 0;
char* keyJoined = taosStringBuilderGetResult(&sb, &len); char* keyJoined = taosStringBuilderGetResult(&sb, &len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册