xiedeyantu commented on code in PR #4744:
URL: https://github.com/apache/calcite/pull/4744#discussion_r2690607248
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -502,6 +502,24 @@ private HepProgram createHypergraphProgram() {
.checkUnchanged();
}
+ /**
+ * Test case for <a
href="https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-7375">
+ * [CALCITE-7375] ProjectWindowTransposeRule does not correctly adjust
column indices in window
+ * bounds</a>. */
Review Comment:
It is best to maintain consistency with other Javadoc formats.
```
/** Test case for
* <a
href="https://issues.apache.org/jira/browse/CALCITE-6887">[CALCITE-6887]
* ReduceExpressionsRule applied to 'IN subquery' should make the values
distinct
* if the subquery is a Values composed of literals</a>. */
```
##########
core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:
##########
@@ -502,6 +502,24 @@ private HepProgram createHypergraphProgram() {
.checkUnchanged();
}
+ /**
+ * Test case for <a
href="https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-7375">
+ * [CALCITE-7375] ProjectWindowTransposeRule does not correctly adjust
column indices in window
+ * bounds</a>. */
+ @Test void testNestedConstantWindow() {
+ final String sql =
+ "select deptno, f1, f2 from (\n"
+ + "select *, last_value(deptno) over"
+ + " (order by empno ROWS BETWEEN 2 PRECEDING AND 1 FOLLOWING)
f2\n"
+ + "from (\n"
+ + " select *, first_value(deptno) over "
+ + " (order by empno ROWS BETWEEN 2 PRECEDING AND 1 FOLLOWING)
f1 from emp))\n";
Review Comment:
The indentation of Java code should also be adjusted, including the format
of SQL. You can see that the SQL format displayed in the XML is not elegant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]