Skip to content

Commit e509497

Browse files
committed
[IOTDB-17635] Fix window optimization test expectation
1 parent fbf6fa4 commit e509497

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/relational/planner/WindowFunctionOptimizationTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,22 @@ public void testSwapWindowFunctions() {
9797
"SELECT sum(s1) OVER (PARTITION BY tag1, s1), min(s1) OVER (PARTITION BY tag1) FROM table1";
9898
LogicalQueryPlan logicalQueryPlan2 = planTester.createPlan(sql2);
9999

100-
// Two window function has swapped, but the query plan remains the same
100+
// Two window functions have swapped. Since the initial sort by (tag1, s1) satisfies both
101+
// windows, no extra sort is needed between them.
101102
/*
102103
* └──OutputNode
103104
* └──ProjectNode
104105
* └──WindowNode(PARTITION BY tag1, s1)
105-
* └──SortNode
106-
* └──WindowNode(PARTITION BY tag1)
107-
* └──SortNode
108-
* └──TableScanNode
106+
* └──WindowNode(PARTITION BY tag1)
107+
* └──SortNode
108+
* └──TableScanNode
109109
*/
110110
assertPlan(
111111
logicalQueryPlan2,
112112
output(
113113
project(
114114
window(
115-
ImmutableList.of("tag1", "s1"),
116-
ImmutableList.of(),
117-
sort(window(sort(tableScan)))))));
115+
ImmutableList.of("tag1", "s1"), ImmutableList.of(), window(sort(tableScan))))));
118116
}
119117

120118
@Test

0 commit comments

Comments
 (0)