未验证 提交 d5243285 编写于 作者: Y Yang Zhao 提交者: GitHub

[TD-13081]<feature>taosBenchmark support partial column insertion (#9905)

* add test cases

* add test cases

* [TD-13081]<feature>taosBenchmark support specified col write

* [TD-13081]<feature>taosBenchmark support specified col write
上级 9246ae29
......@@ -37,12 +37,44 @@ class TDTestCase:
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db.stb1")
tdSql.checkData(0, 0, 160)
tdSql.query("select distinct(c5) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c6) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c7) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c8) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c9) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c10) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c11) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c12) from db.stb1")
tdSql.checkData(0, 0, None)
tdSql.execute("reset query cache")
tdSql.query("select count(tbname) from db.`stb1-2`")
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db.`stb1-2`")
tdSql.checkData(0, 0, 160)
tdSql.query("select distinct(c5) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c6) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c7) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c8) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c9) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c10) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c11) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c12) from db.`stb1-2`")
tdSql.checkData(0, 0, None)
cmd = "taosBenchmark -f ./5-taos-tools/taosbenchmark/json/stmt_auto_create_table.json"
tdLog.info("%s" % cmd)
......
......@@ -55,6 +55,7 @@
"sample_file": "./sample.csv",
"use_sample_ts": "no",
"tags_file": "",
"partial_col_num": 5,
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
"tags": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 19, "count":1}]
},{
......@@ -80,6 +81,7 @@
"sample_file": "./sample.csv",
"use_sample_ts": "no",
"tags_file": "",
"partial_col_num": 5,
"columns": [{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
"tags": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 19, "count":1}]
}]
......
......@@ -55,6 +55,7 @@
"sample_file": "./sample.csv",
"use_sample_ts": "no",
"tags_file": "",
"partial_col_num": 999,
"columns": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
"tags": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 19, "count":1}]
}]
......
......@@ -55,7 +55,8 @@
"sample_file": "./sample.csv",
"use_sample_ts": "no",
"tags_file": "",
"columns": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
"partial_col_num": 3,
"columns": [{"type": "TIMESTAMP"},{"type": "INT", "len": 0}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 29, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 23, "count":1}],
"tags": [{"type": "TIMESTAMP"},{"type": "INT"}, {"type": "BIGINT"}, {"type": "FLOAT"}, {"type": "DOUBLE"}, {"type": "SMALLINT"}, {"type": "TINYINT"}, {"type": "BOOL"}, {"type": "NCHAR","len": 17, "count":1}, {"type": "UINT"}, {"type": "UBIGINT"}, {"type": "UTINYINT"}, {"type": "USMALLINT"}, {"type": "BINARY", "len": 19, "count":1}]
}]
}]
......
......@@ -56,6 +56,30 @@ class TDTestCase:
tdSql.checkData(0, 0, 8)
tdSql.query("select count(*) from db.stb")
tdSql.checkData(0, 0, 40)
tdSql.query("select distinct(c1) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c3) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c4) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c5) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c6) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c7) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c8) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c9) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c10) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c11) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c12) from db.stb")
tdSql.checkData(0, 0, None)
tdSql.query("select distinct(c13) from db.stb")
tdSql.checkData(0, 0, None)
def stop(self):
tdSql.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册