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 36c200a47..5f6f69bed 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 @@ -31,6 +31,7 @@ import cn.edu.tsinghua.iot.benchmark.entity.DeviceSummary; import cn.edu.tsinghua.iot.benchmark.entity.Record; import cn.edu.tsinghua.iot.benchmark.entity.Sensor; +import cn.edu.tsinghua.iot.benchmark.entity.enums.SQLDialect; import cn.edu.tsinghua.iot.benchmark.entity.enums.SensorType; import cn.edu.tsinghua.iot.benchmark.exception.OperationFailException; import cn.edu.tsinghua.iot.benchmark.iotdb200.IoTDB; @@ -366,7 +367,11 @@ public long executeQueryAndGetStatusImpl( long resultPointNum = line.get(); if (!Operation.LATEST_POINT_QUERY.equals(operation)) { resultPointNum *= config.getQUERY_SENSOR_NUM(); - resultPointNum *= config.getQUERY_DEVICE_NUM(); + if (!config.getIoTDB_DIALECT_MODE().equals(SQLDialect.TABLE)) { + resultPointNum *= config.getQUERY_DEVICE_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 3b542c2a4..81e02dd18 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(") + .append(" date_bin_gapfill(") .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(") + .append(" group by device_id, date_bin_gapfill(") .append(groupByQuery.getGranularity()) .append("ms, time)"); // ORDER BY