From 0215a5db203c101e6de4f7548edb222209c67d4b Mon Sep 17 00:00:00 2001 From: Yangyuming <2822758820@qq.com> Date: Thu, 28 Nov 2024 18:45:44 +0800 Subject: [PATCH] fix okpointNum for table. --- .../benchmark/iotdb200/DMLStrategy/SessionStrategy.java | 9 +++++---- .../benchmark/iotdb200/ModelStrategy/TableStrategy.java | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/DMLStrategy/SessionStrategy.java b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/DMLStrategy/SessionStrategy.java index 5f6f69bed..b7cca7737 100644 --- a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/DMLStrategy/SessionStrategy.java +++ b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/DMLStrategy/SessionStrategy.java @@ -365,13 +365,14 @@ public long executeQueryAndGetStatusImpl( isOk.set(false); } long resultPointNum = line.get(); - if (!Operation.LATEST_POINT_QUERY.equals(operation)) { + + if (config.getIoTDB_DIALECT_MODE().equals(SQLDialect.TABLE)) { resultPointNum *= config.getQUERY_SENSOR_NUM(); - if (!config.getIoTDB_DIALECT_MODE().equals(SQLDialect.TABLE)) { + } else { + if (!Operation.LATEST_POINT_QUERY.equals(operation)) { resultPointNum *= config.getQUERY_DEVICE_NUM(); + resultPointNum *= config.getQUERY_SENSOR_NUM(); } - } else if (config.getIoTDB_DIALECT_MODE().equals(SQLDialect.TABLE)) { - resultPointNum *= config.getQUERY_SENSOR_NUM(); } queryResultPointNum.set(resultPointNum); }); diff --git a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java index 81e02dd18..3b542c2a4 100644 --- a/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java +++ b/iotdb-2.0/src/main/java/cn/edu/tsinghua/iot/benchmark/iotdb200/ModelStrategy/TableStrategy.java @@ -208,7 +208,7 @@ public String getGroupByQuerySQL(GroupByQuery groupByQuery, boolean addOrderBy) builder .append("SELECT") .append(" device_id,") - .append(" date_bin_gapfill(") + .append(" date_bin(") .append(groupByQuery.getGranularity()) .append("ms, ") .append("time), ") @@ -225,7 +225,7 @@ public String getGroupByQuerySQL(GroupByQuery groupByQuery, boolean addOrderBy) addDeviceIDColumnIfNecessary(groupByQuery.getDeviceSchema(), builder); // GROUP BY builder - .append(" group by device_id, date_bin_gapfill(") + .append(" group by device_id, date_bin(") .append(groupByQuery.getGranularity()) .append("ms, time)"); // ORDER BY