This is an automated email from the ASF dual-hosted git repository. leirui pushed a commit to branch research/LTS-visualization in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit f2301c292d52d997a604bf5a4c028be636c82a3e Author: Lei Rui <[email protected]> AuthorDate: Tue Oct 8 23:20:49 2024 +0800 add --- .../groupby/LocalGroupByExecutorTri_ILTS.java | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/LocalGroupByExecutorTri_ILTS.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/LocalGroupByExecutorTri_ILTS.java index eb35061abe8..63e081de5bd 100644 --- a/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/LocalGroupByExecutorTri_ILTS.java +++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/LocalGroupByExecutorTri_ILTS.java @@ -395,29 +395,27 @@ public class LocalGroupByExecutorTri_ILTS implements GroupByExecutor { pageReader, bitSet, chunkSuit4Tri.chunkMetadata.getStatistics().getCount()); - if (foundPoints.size() > 0) { - double ch_maxDistance = -1; - long ch_select_t = -1; - double ch_select_v = -1; - for (QuickHullPoint point : foundPoints) { - IOMonitor2.DCP_D_getAllSatisfiedPageData_traversedPointNum++; - double distance = IOMonitor2.calculateDistance(lt, lv, point.t, point.v, rt, rv); - if (distance > ch_maxDistance) { - ch_maxDistance = distance; - ch_select_t = point.t; - ch_select_v = point.v; - } - } - if (ch_maxDistance <= maxDistance) { - continue; - } - if (ch_select_t >= localCurStartTime && ch_select_t < localCurEndTime) { - maxDistance = ch_maxDistance; - select_t = ch_select_t; - select_v = ch_select_v; - continue; // note this + double ch_maxDistance = -1; + long ch_select_t = -1; + double ch_select_v = -1; + for (QuickHullPoint point : foundPoints) { + IOMonitor2.DCP_D_getAllSatisfiedPageData_traversedPointNum++; + double distance = IOMonitor2.calculateDistance(lt, lv, point.t, point.v, rt, rv); + if (distance > ch_maxDistance) { + ch_maxDistance = distance; + ch_select_t = point.t; + ch_select_v = point.v; } } + if (ch_maxDistance <= maxDistance) { + continue; + } + if (ch_select_t >= localCurStartTime && ch_select_t < localCurEndTime) { + maxDistance = ch_maxDistance; + select_t = ch_select_t; + select_v = ch_select_v; + continue; // note this + } } int count = chunkSuit4Tri.chunkMetadata.getStatistics().getCount(); int j; @@ -486,8 +484,6 @@ public class LocalGroupByExecutorTri_ILTS implements GroupByExecutor { long lpt = pageReader.timeBuffer.getLong((count - 1) * 8); double lpv = pageReader.valueBuffer.getDouble(pageReader.timeBufferLength + (count - 1) * 8); - // TODO 水平线? - double A = lv - rv; double B = rt - lt; @@ -620,6 +616,10 @@ public class LocalGroupByExecutorTri_ILTS implements GroupByExecutor { } } } + + if (foundPoints.size() == 0) { // means parallel + foundPoints.add(new QuickHullPoint(fpt, fpv)); + } return foundPoints; }
