From 4c787dec672594996e132617a1f259fba991ef09 Mon Sep 17 00:00:00 2001 From: liyuheng Date: Tue, 2 Jan 2024 18:26:35 +0800 Subject: [PATCH] tdengine q11 done --- .../java/cn/edu/tsinghua/iot/benchmark/tdengine3/TDengine.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdengine-3.0/src/main/java/cn/edu/tsinghua/iot/benchmark/tdengine3/TDengine.java b/tdengine-3.0/src/main/java/cn/edu/tsinghua/iot/benchmark/tdengine3/TDengine.java index 819c707f3..85b4cd6f7 100644 --- a/tdengine-3.0/src/main/java/cn/edu/tsinghua/iot/benchmark/tdengine3/TDengine.java +++ b/tdengine-3.0/src/main/java/cn/edu/tsinghua/iot/benchmark/tdengine3/TDengine.java @@ -67,6 +67,7 @@ public class TDengine implements IDatabase { private static final String USE_DB = "use %s"; private static final String SUPER_TABLE_NAME = "device"; private static final String ORDER_BY_TIME_DESC = " order by time desc "; + private static final String ORDER_BY_WSTART_DESC = " order by _wstart desc "; private static final AtomicBoolean isInit = new AtomicBoolean(false); private final String CREATE_STABLE; @@ -407,7 +408,7 @@ public Status groupByQueryOrderByDesc(GroupByQuery groupByQuery) { addWhereClause( sqlHeader, groupByQuery, null, getTableNameFilterForAlignByDevice(groupByQuery)); sql = addGroupByClause(sql, groupByQuery.getGranularity()); - sql += ORDER_BY_TIME_DESC; + sql += ORDER_BY_WSTART_DESC; return addTailClausesAndExecuteQueryAndGetStatus(sql); }