thulab / iot-benchmark

IoT-benchmark is a tool for benchmarking TSDB in IoT scenario.
Apache License 2.0
180 stars 101 forks source link

support table model #436

Closed YangYumings closed 2 weeks ago

YangYumings commented 1 month ago

Query functions Q1, Q2, Q3, Q9, Q10. 1.1 After the keyword from, the table model is connected to "database.tableName“, and the tree model is connected to "root.test.g_0.d_0"; 1.2 After the keyword where, the table model is connected to ”columnName“, and the tree model is connected to "root.test.g_0.d_0.s_0" ;

Write function. 2.1 Mapping tree model to table model; Retain the logic of tree model as much as possible. In root.test.g_0.d_0, test is the database, g_0_table is the table name, and d_0 is the identifier column; that is, all the data of an organization is stored in one table, and only one database is created; 2.2 Create database and table; The database creation uses synchronization blocks to ensure that only one database is created; 2.3 Write request requires new information columnCategories Add the attribute columnCategories in sensor. If it is a table model, create a table containing columnCategories in gentable. 2.4 Generate an identifier column The name of the identifier column is currently fixed as "device_ID". In initworkload, if columnCategories == ID, the value of device_ID is generated.

YangYumings commented 1 month ago

新增 boolean 参数 ENABLE_TABLE,默认为 false。在 dbConfig 中增加 SQL_dialect ,用于为 session 指定 sql 解析。在加载配置阶段根据 ENABLE_TABLE 的值为 SQL_dialect 赋值。

YangYumings commented 1 month ago

实现过程中的一些记录。https://timechor.feishu.cn/docx/ThAUdBlmgoJaS7xQeROc84SEnDe?from=from_copylink

YangYumings commented 1 month ago

目前在 initSensorCode 与 initWorkload 创建存储标识列的sensor太死板了。大家有没嘚好的 idea

YangYumings commented 4 weeks ago

为了便于区别支持表模型所做的修改,暂时 iotdb-1.3 支持表模型。等到代码无误后,在将 iotdb-1.3 回退到不支持表模型版本。