Skip to content

Commit

Permalink
fix okpointNum for table.
Browse files Browse the repository at this point in the history
  • Loading branch information
YangYumings committed Nov 28, 2024
1 parent 963ab57 commit 0215a5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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), ")
Expand All @@ -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
Expand Down

0 comments on commit 0215a5d

Please sign in to comment.