danny0405 commented on a change in pull request #1896: 3877, 3892, 3814 and 3876
URL: https://github.com/apache/calcite/pull/1896#discussion_r402736722
 
 

 ##########
 File path: 
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
 ##########
 @@ -2749,6 +2749,28 @@ private void checkLiteral2(String expression, String 
expected) {
     sql(query).ok(expected);
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-3876";>[CALCITE-3876]
+   * RelToSqlConverter should not combine Projects when top Project contains
+   * window function referencing window function from bottom Project</a>. */
+  @Test public void testWindowOnWindowDoesNotCombineProjects() {
+    final String query = "SELECT ROW_NUMBER() OVER (ORDER BY rn)\n"
+        + "FROM (SELECT *,\n"
+        + "  ROW_NUMBER() OVER (ORDER BY \"product_id\") as rn\n"
 
 Review comment:
   What about we do not have any options for `OVER `, there would then has no 
reference for underlying inputs.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to