James-Jeyun-Kim commented on a change in pull request #2422:
URL: https://github.com/apache/calcite/pull/2422#discussion_r646871968



##########
File path: 
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
##########
@@ -3131,19 +3132,36 @@ private void checkLiteral2(String expression, String 
expected) {
             + "OVER (PARTITION BY \"hire_date\" ORDER BY \"employee_id\"), 
\"hire_date\"\n"
             + "FROM \"foodmart\".\"employee\"\n"
             + "GROUP BY \"hire_date\", \"employee_id\"";
+
+    HepProgramBuilder builder = new HepProgramBuilder();
+    builder.addRuleClass(ProjectToWindowRule.class);
+    HepPlanner hepPlanner = new HepPlanner(builder.build());
+    RuleSet rules = 
RuleSets.ofList(CoreRules.PROJECT_TO_LOGICAL_PROJECT_AND_WINDOW);
+
+    sql(query0).optimize(rules, hepPlanner).ok(expected0);
+    sql(query1).optimize(rules, hepPlanner).ok(expected1);
+    sql(query2).optimize(rules, hepPlanner).ok(expected2);
+    sql(query3).optimize(rules, hepPlanner).ok(expected3);
+    sql(query4).optimize(rules, hepPlanner).ok(expected4);
+    sql(query5).optimize(rules, hepPlanner).ok(expected5);
+    sql(query6).optimize(rules, hepPlanner).ok(expected6);
+  }
+
+  @Disabled
+  @Test void testConvertWindowToSql2() {
     String query7 = "SELECT "
-        + "count(distinct \"employee_id\") over (order by \"hire_date\") FROM 
\"employee\"";
+        + "count(\"employee_id\") over (order by \"hire_date\") FROM 
\"employee\"";

Review comment:
       I added the distinct keyword back. I moved the distinct tests from 
testConvertWindowToSql and moved them to this new, disabled test since 
currently these will fail. In the future, when distinct on aggregate window is 
properly implemented, this test can be enabled again.




-- 
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]


Reply via email to