amaliujia commented on a change in pull request #1707: [CALCITE-3649] Hints 
should be propagated correctly in planner rules …
URL: https://github.com/apache/calcite/pull/1707#discussion_r362141663
 
 

 ##########
 File path: 
core/src/test/java/org/apache/calcite/test/SqlHintsConverterTest.java
 ##########
 @@ -387,6 +389,25 @@ protected DiffRepository getDiffRepos() {
         Collections.emptyList(), Collections.emptyList());
   }
 
+  @Test public void testHintsPropagateWithDifferentKindOfRels() {
+    final String sql = "select /*+ AGG_STRATEGY(TWO_PHASE) */\n"
+        + "ename, avg(sal)\n"
+        + "from emp group by ename";
+    final RelNode rel = tester.convertSqlToRel(sql).rel;
+    final RelHint hint = RelHint.of(
+        Collections.emptyList(),
+        "AGG_STRATEGY",
+        Collections.singletonList("TWO_PHASE"));
+    // Validate Hep planner.
+    HepProgram program = new HepProgramBuilder()
+        .addRuleInstance(AggregateReduceFunctionsRule.INSTANCE)
 
 Review comment:
   gotcha. Thanks for your clarification.

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