提交 13742d73 编写于 作者: sangshuduo's avatar sangshuduo

Merge branch '2.6' into fix/TS-1719-V26

......@@ -134,6 +134,19 @@ def sync_source() {
git submodule update --init --recursive
'''
}
def pre_test_arm64() {
sync_source()
sh '''
cd ${WK}
mkdir -p debug
cd debug
go env -w GOPROXY=https://goproxy.cn,direct
go env -w GO111MODULE=on
cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true > /dev/null
make -j8 >/dev/null
'''
return 1
}
def pre_test() {
sync_source()
sh '''
......@@ -330,7 +343,7 @@ pipeline {
agent {label " worker07_arm64 || worker09_arm64 "}
steps {
timeout(time: 20, unit: 'MINUTES') {
pre_test()
pre_test_arm64()
script {
sh '''
echo "arm64 build done"
......
......@@ -51,7 +51,7 @@ TDengine is a distributed and high performance time series database, there are a
1. Set proper number of `vgroups` according to available CPU cores. Normally, we recommend 2 \* number_of_cores as a starting point. If the verification result shows this is not enough to utilize CPU resources, you can use a higher value.
2. Set proper `minTablesPerVnode`, `tableIncStepPerVnode`, and `maxVgroupsPerDb` according to the number of tables so that tables are distributed even across vgroups. The purpose is to balance the workload among all vnodes so that system resources can be utilized better to get higher performance.
For more performance tuning tips, please refer to [Performance Optimization](../../operation/optimize) and [Configuration Parameters](../../reference/config).
For more performance tuning tips, please refer to [Performance Optimization](../../../operation/optimize) and [Configuration Parameters](../../../reference/config).
## Sample Programs
......
......@@ -37,12 +37,12 @@ In the schemaless writing data line protocol, each data item in the field_set ne
| **Serial number** | **Postfix** | **Mapping type** | **Size (bytes)** |
| -------- | -------- | ------------ | -------------- |
| 1 | none or f64 | double | 8 |
| 2 | f32 | float | 4 |
| 3 | i8 | TinyInt | 1 |
| 4 | i16 | SmallInt | 2 |
| 5 | i32 | Int | 4 |
| 6 | i64 or i | Bigint | 8 |
| 1 | none or f64 | double | 8 |
| 2 | f32 | float | 4 |
| 3 | i8/u8 | TinyInt/UTinyInt | 1 |
| 4 | i16/u16 | SmallInt/USmallInt | 2 |
| 5 | i32/u32 | Int/UInt | 4 |
| 6 | i64/i/u64/u | BigInt/BigInt/UBigInt/UBigInt | 8 |
- `t`, `T`, `true`, `True`, `TRUE`, `f`, `F`, `false`, and `False` will be handled directly as BOOL types.
......@@ -67,13 +67,13 @@ Schemaless writes process row data according to the following principles.
Note that tag_key1, tag_key2 are not the original order of the tags entered by the user but the result of using the tag names in ascending order of the strings. Therefore, tag_key1 is not the first tag entered in the line protocol.
The string's MD5 hash value "md5_val" is calculated after the ranking is completed. The calculation result is then combined with the string to generate the table name: "t_md5_val". "t*" is a fixed prefix that every table generated by this mapping relationship has.
2. If the super table obtained by parsing the line protocol does not exist, this super table is created.
2. If the super table obtained by parsing the line protocol does not exist, this super table is created(It is not recommended to create a super table manually, otherwise the inserted data may be abnormal).
If the subtable obtained by the parse line protocol does not exist, Schemaless creates the sub-table according to the subtable name determined in steps 1 or 2.
4. If the specified tag or regular column in the data row does not exist, the corresponding tag or regular column is added to the super table (only incremental).
5. If there are some tag columns or regular columns in the super table that are not specified to take values in a data row, then the values of these columns are set to NULL.
6. For BINARY or NCHAR columns, if the length of the value provided in a data row exceeds the column type limit, the maximum length of characters allowed to be stored in the column is automatically increased (only incremented and not decremented) to ensure complete preservation of the data.
7. If the specified data subtable already exists, and the specified tag column takes a value different from the saved value this time, the value in the latest data row overwrites the old tag column take value.
8. Errors encountered throughout the processing will interrupt the writing process and return an error code.
7. Errors encountered throughout the processing will interrupt the writing process and return an error code.
8. In order to improve the efficiency of writing, the order of fields in the same super table should be the same. If the order is different, you need to configure the parameter smlDataFormat to false, otherwise, the data in the library will be abnormal.
:::tip
All processing logic of schemaless will still follow TDengine's underlying restrictions on data structures, such as the total length of each row of data cannot exceed 48k bytes. See [TAOS SQL Boundary Limits](/taos-sql/limit) for specific constraints in this area.
......
......@@ -44,7 +44,7 @@ import TabItem from "@theme/TabItem";
如果总表数比较大(比如大于500万),适当增加 maxVgroupsPerDb 也能显著提高建表的速度。maxVgroupsPerDb 默认值为 0, 自动配置为 CPU 的核数。 如果表的数量巨大,也建议调节 maxTablesPerVnode 参数,以免超过单个 vnode 建表的上限。
更多调优参数,请参考[性能优化](../../operation/optimize)[配置参考](../../reference/config)部分。
更多调优参数,请参考[性能优化](../../../operation/optimize)[配置参考](../../../reference/config)部分。
## 高效写入示例 {#sample-code}
......
......@@ -27,4 +27,4 @@ title: 转义字符说明
2. 反引号``标识符: 保持原样,不转义
2. 数据里有转义字符
1. 遇到上面定义的转义字符会转义(%和\_见下面说明),如果没有匹配的转义字符会忽略掉转义符\。
2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`%和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_
2. 对于%和\_,因为在 like 里这两个字符是通配符,所以在模式匹配 like 里用`\%`和`\_`表示字符里本身的%和\_,如果在 like 模式匹配上下文之外使用`\%`或`\_`,则它们的计算结果为字符串`\%`和`\_`,而不是%和\_
......@@ -41,10 +41,10 @@ tag_set 中的所有的数据自动转化为 nchar 数据类型,并不需要
| -------- | -------- | ------------ | -------------- |
| 1 | 无或 f64 | double | 8 |
| 2 | f32 | float | 4 |
| 3 | i8 | TinyInt | 1 |
| 4 | i16 | SmallInt | 2 |
| 5 | i32 | Int | 4 |
| 6 | i64 或 i | Bigint | 8 |
| 3 | i8/u8 | TinyInt/UTinyInt | 1 |
| 4 | i16/u16 | SmallInt/USmallInt | 2 |
| 5 | i32/u32 | Int/UInt | 4 |
| 6 | i64/i/u64/u | BigInt/BigInt/UBigInt/UBigInt | 8 |
- t, T, true, True, TRUE, f, F, false, False 将直接作为 BOOL 型来处理。
......@@ -69,16 +69,17 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000
```
需要注意的是,这里的 tag_key1, tag_key2 并不是用户输入的标签的原始顺序,而是使用了标签名称按照字符串升序排列后的结果。所以,tag_key1 并不是在行协议中输入的第一个标签。
排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t\*” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。
排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t_” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。
2. 如果解析行协议获得的超级表不存在,则会创建这个超级表。
2. 如果解析行协议获得的超级表不存在,则会创建这个超级表(不建议手动创建超级表,不然插入数据可能异常)
3. 如果解析行协议获得子表不存在,则 Schemaless 会按照步骤 1 或 2 确定的子表名来创建子表。
4. 如果数据行中指定的标签列或普通列不存在,则在超级表中增加对应的标签列或普通列(只增不减)。
5. 如果超级表中存在一些标签列或普通列未在一个数据行中被指定取值,那么这些列的值在这一行中会被置为
NULL。
6. 对 BINARY 或 NCHAR 列,如果数据行中所提供值的长度超出了列类型的限制,自动增加该列允许存储的字符长度上限(只增不减),以保证数据的完整保存。
7. 如果指定的数据子表已经存在,而且本次指定的标签列取值跟已保存的值不一样,那么最新的数据行中的值会覆盖旧的标签列取值。
8. 整个处理过程中遇到的错误会中断写入过程,并返回错误代码。
7. 整个处理过程中遇到的错误会中断写入过程,并返回错误代码。
8. 为了提高写入的效率,默认假设同一个超级表中field_set的顺序是一样的(第一条数据包含所有的field,后面的数据按照这个顺序),如果顺序不一样,需要配置参数smlDataFormat为false,否则,
数据写入按照相同顺序写入,库中数据会异常。
:::tip
无模式所有的处理逻辑,仍会遵循 TDengine 对数据结构的底层限制,例如每行数据的总长度不能超过
......@@ -94,7 +95,7 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000
| -------- | ------------------- | ------------------------------- |
| 1 | SML_LINE_PROTOCOL | InfluxDB 行协议(Line Protocol) |
| 2 | SML_TELNET_PROTOCOL | OpenTSDB 文本行协议 |
| 3 | SML_JSON_PROTOCOL | JSON 协议格式 |
| 3 | SML_JSON_PROTOCOL | OpenTSDB JSON 协议格式 |
在 SML_LINE_PROTOCOL 解析模式下,需要用户指定输入的时间戳的时间分辨率。可用的时间分辨率如下表所示:
......
......@@ -2058,6 +2058,7 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
const char *start, *cur;
int32_t ret = TSDB_CODE_SUCCESS;
char *value = NULL;
int32_t bufSize = TSDB_FUNC_BUF_SIZE;
int16_t len = 0;
bool kv_done = false;
......@@ -2077,6 +2078,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
val_rqoute
} val_state;
value = malloc(bufSize);
if (value == NULL) {
ret = TSDB_CODE_TSC_OUT_OF_MEMORY;
goto error;
}
start = cur = *idx;
tag_state = tag_common;
val_state = val_common;
......@@ -2095,7 +2101,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
back_slash = false;
cur++;
len++;
break;
}
......@@ -2104,7 +2109,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
tag_state = tag_lqoute;
}
cur += 1;
len += 1;
break;
} else if (*cur == 'L') {
line_len = strlen(*idx);
......@@ -2122,7 +2126,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
tag_state = tag_lqoute;
}
cur += 2;
len += 2;
break;
}
}
......@@ -2131,8 +2134,7 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
case '\\':
back_slash = true;
cur++;
len++;
break;
continue;
case ',':
kv_done = true;
break;
......@@ -2146,7 +2148,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
default:
cur++;
len++;
}
break;
......@@ -2160,7 +2161,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
back_slash = false;
cur++;
len++;
break;
} else if (double_quote == true) {
if (*cur != ' ' && *cur != ',' && *cur != '\0') {
......@@ -2182,13 +2182,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
case '\\':
back_slash = true;
cur++;
len++;
break;
continue;
case '"':
double_quote = true;
cur++;
len++;
break;
case '\0':
......@@ -2199,7 +2197,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
default:
cur++;
len++;
}
break;
......@@ -2217,9 +2214,8 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
goto error;
}
back_slash = false;
cur++;
len++;
back_slash = false;
cur++;
break;
}
......@@ -2235,7 +2231,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
}
cur += 1;
len += 1;
break;
} else if (*cur == 'L') {
line_len = strlen(*idx);
......@@ -2252,12 +2247,10 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
if (cur + 1 == *idx + 1) {
val_state = val_lqoute;
cur += 2;
len += 2;
} else {
/* MUST at the end of string */
if (cur + 2 >= *idx + line_len) {
cur += 2;
len += 2;
*is_last_kv = true;
kv_done = true;
} else {
......@@ -2271,7 +2264,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
}
cur += 2;
len += 2;
kv_done = true;
}
}
......@@ -2284,8 +2276,7 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
case '\\':
back_slash = true;
cur++;
len++;
break;
continue;
case ',':
kv_done = true;
......@@ -2300,7 +2291,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
default:
cur++;
len++;
}
break;
......@@ -2311,10 +2301,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
ret = TSDB_CODE_TSC_LINE_SYNTAX_ERROR;
goto error;
}
if (*cur == '"') {
start++;
}
back_slash = false;
cur++;
len++;
break;
} else if (double_quote == true) {
if (*cur != ' ' && *cur != ',' && *cur != '\0') {
......@@ -2336,13 +2327,11 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
case '\\':
back_slash = true;
cur++;
len++;
break;
continue;
case '"':
double_quote = true;
cur++;
len++;
break;
case '\0':
......@@ -2353,7 +2342,6 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
default:
cur++;
len++;
}
break;
......@@ -2362,24 +2350,35 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
}
}
if (start < cur) {
if (bufSize <= len + (cur - start)) {
bufSize *= 2;
char *tmp = realloc(value, bufSize);
if (tmp == NULL) {
ret = TSDB_CODE_TSC_OUT_OF_MEMORY;
goto error;
}
value = tmp;
}
memcpy(value + len, start, cur - start); // [start, cur)
len += cur - start;
start = cur;
}
if (kv_done == true) {
break;
}
}
if (len == 0 || ret != TSDB_CODE_SUCCESS) {
free(pKV->key);
pKV->key = NULL;
return TSDB_CODE_TSC_LINE_SYNTAX_ERROR;
ret = TSDB_CODE_TSC_LINE_SYNTAX_ERROR;
goto error;
}
value = calloc(len + 1, 1);
memcpy(value, start, len);
value[len] = '\0';
if (!convertSmlValueType(pKV, value, len, info, isTag)) {
tscError("SML:0x%"PRIx64" Failed to convert sml value string(%s) to any type",
info->id, value);
free(value);
ret = TSDB_CODE_TSC_INVALID_VALUE;
goto error;
}
......@@ -2389,7 +2388,8 @@ static int32_t parseSmlValue(TAOS_SML_KV *pKV, const char **idx,
return ret;
error:
//free previous alocated key field
//free previous alocated buffer and key field
free(value);
free(pKV->key);
pKV->key = NULL;
return ret;
......
Subproject commit 9cfa195713d1cae9edf417a8d49bde87dd971016
Subproject commit 1f571eb99802d8d0f2777d144b24fa4052cadac7
......@@ -204,7 +204,7 @@
36,,script,./test.sh -f unique/arbitrator/offline_replica3_createTable_online.sim
36,,script,./test.sh -f unique/arbitrator/offline_replica2_dropTable_online.sim
36,,script,./test.sh -f general/parser/tbnameIn.sim
36,,pytest,python3 test.py -f tools/taosdumpTestNanoSupport.py
#36,,pytest,python3 test.py -f tools/taosdumpTestNanoSupport.py
35,,script,./test.sh -f unique/migrate/mn2_vn2_repl2_rmMnodeVnodeDir_stopAll_starAll.sim
35,,script,./test.sh -f unique/arbitrator/offline_replica3_alterTag_online.sim
35,,script,./test.sh -f unique/arbitrator/offline_replica2_alterTag_online.sim
......@@ -219,7 +219,7 @@
33,,script,./test.sh -f general/table/delete_writing.sim
33,,script,./test.sh -f general/parser/slimit.sim
33,,script,./test.sh -f general/db/topic1.sim
32,,system-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestColTag.py
#32,,system-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestColTag.py
32,,script,./test.sh -f unique/mnode/mgmt21.sim
32,,script,./test.sh -f unique/arbitrator/offline_replica3_dropDb_online.sim
32,,script,./test.sh -f unique/arbitrator/dn3_mn2_killDnode.sim
......@@ -323,7 +323,7 @@
19,,script,./test.sh -f unique/stable/dnode2.sim
19,,script,./test.sh -f general/db/vnodes.sim
19,,pytest,python3 test.py -f multilevel/addAnotherDir.py
19,,pytest,python3 test.py -f tools/taosdumpTest3.py
#19,,pytest,python3 test.py -f tools/taosdumpTest3.py
19,,pytest,python3 test.py -f query/udf.py
19,,pytest,python3 test.py -f import_merge/importLastTPO.py
19,,pytest,python3 test.py -f import_merge/importDataLastHO.py
......@@ -410,7 +410,7 @@
15,,pytest,python3 test.py -f functions/function_last.py -r 1
15,,pytest,python3 test.py -f functions/function_avg.py -r 1
14,,script,./test.sh -f general/stream/metrics_del.sim
14,,system-test,python3 ./test.py -f 5-taos-tools/TD-12478.py
#14,,system-test,python3 ./test.py -f 5-taos-tools/TD-12478.py
14,,script,./test.sh -f unique/account/basic.sim
14,,script,./test.sh -f general/table/limit.sim
14,,script,./test.sh -f general/table/createmulti.sim
......@@ -579,34 +579,34 @@
9,,pytest,python3 test.py -f stream/showStreamExecTimeisNull.py
9,,pytest,python3 test.py -f query/bug1876.py
9,,pytest,python3 test.py -f alter/alter_table_crash.py
9,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py
9,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeFloat.py
8,,pytest,python3 test.py -f tools/taosdumpTest.py
#9,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py
#9,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeFloat.py
#8,,pytest,python3 test.py -f tools/taosdumpTest.py
8,,pytest,python3 test.py -f query/unionAllTest.py
8,,pytest,python3 test.py -f query/queryFilterTswithDateUnit.py
8,,pytest,python3 test.py -f query/queryDiffColsTagsAndOr.py
8,,pytest,python3 test.py -f query/nestedQuery/nestedQuery_datacheck.py
8,,pytest,python3 test.py -f query/bug1874.py
8,,pytest,python3 test.py -f functions/function_floor.py
8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py
8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py
8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py
8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeInt.py
8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeDouble.py
#8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py
#8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py
#8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py
#8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeInt.py
#8,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeDouble.py
8,,pytest,python3 test.py -f update/update2.py
7,,system-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/taosdemoTestInsertWithJsonSml-otherPara.py
7,,pytest,python3 test.py -f tools/taosdumpTest2.py
#7,,pytest,python3 test.py -f tools/taosdumpTest2.py
7,,pytest,python3 test.py -f tools/taosdemoTestdatatype.py
7,,pytest,python3 test.py -f tag_lite/unsignedInt.py
7,,pytest,python3 test.py -f query/bug1875.py
7,,pytest,python3 test.py -f functions/function_stateWindow.py
7,,pytest,python3 test.py -f client/version.py
7,,pytest,python3 client/twoClients.py
7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py
7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py
7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeJson.py
7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeBool.py
7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeBigInt.py
#7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py
#7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py
#7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeJson.py
#7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeBool.py
#7,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestTypeBigInt.py
7,,develop-test,python3 ./test.py -f 2-query/function_timetruncate.py
7,,develop-test,python3 ./test.py -f 2-query/function_timediff.py
7,,pytest,python3 test.py -f tsdb/delete.py
......@@ -660,7 +660,7 @@
5,,pytest,python3 testMinTablesPerVnode.py
5,,pytest,python3 test.py -f tag_lite/unsignedTinyint.py
5,,pytest,python3 test.py -f tag_lite/timestamp.py
5,,pytest,python3 test.py -f tag_lite/TestModifyTag.py
#5,,pytest,python3 test.py -f tag_lite/TestModifyTag.py
5,,pytest,python3 test.py -f tag_lite/json_tag_extra.py
5,,pytest,python3 test.py -f tag_lite/int_binary.py
5,,pytest,python3 test.py -f tag_lite/float.py
......@@ -831,4 +831,4 @@
1,,docs-examples-test, ./test_R.sh
1,,develop-test,python3 ./test.py -f 2-query/function_state.py
1,,develop-test,python3 ./test.py -f 5-taos-tools/taosbenchmark/demo.py
3,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestInspect.py
#3,,develop-test,python3 ./test.py -f 5-taos-tools/taosdump/taosdumpTestInspect.py
......@@ -196,12 +196,19 @@ class TDTestCase:
self._conn.schemaless_insert([
"sts,t1=abc,t2=ab\"c,t3=ab\\,c,t4=ab\\=c,t5=ab\\ c c1=3i64,c3=L\"passitagin\",c2=true,c4=5f64,c5=5f64,c6=\"abc\" 1626006833640000000",
"sts,t1=abc c1=3i64,c2=false,c3=L\"{\\\"date\\\":\\\"2020-01-01 08:00:00.000\\\",\\\"temperature\\\":20}\",c6=\"ab\\\\c\" 1626006833640000000"
"sts,t1=abc c1=3i64,c2=false,c3=L\"{\\\"date\\\":\\\"2020-01-01 08:00:00.000\\\",\\\"temperature\\\":20}\",c6=\"ab\\\\c\" 1626006833640000000",
"type_json5,__deviceId__=10 index=0,jsonAttri$j=\"{\\\"jsonC\\\":\\\"0\\\"}\" 1626006833640000001"
], TDSmlProtocolType.LINE.value, TDSmlTimestampType.NANO_SECOND.value)
tdSql.query('select tbname from sts')
tdSql.checkRows(2)
tdSql.query("select * from sts")
tdSql.checkData(1, 2, '''{"date":"2020-01-01 08:00:00.000","temperature":20}''')
tdSql.query("select * from type_json5")
tdSql.checkData(0, 2, '''{"jsonC":"0"}''')
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册