You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/11/05 20:06:51 UTC

[GitHub] [calcite] a-rafay commented on a change in pull request #2211: [CALCITE-4317] RelFieldTrimmer after trimming all the fields in an ag…

a-rafay commented on a change in pull request #2211:
URL: https://github.com/apache/calcite/pull/2211#discussion_r518333162



##########
File path: core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
##########
@@ -6827,6 +6828,62 @@ protected MyProjectRule(Config config) {
         .check();
   }
 
+  /**
+   * Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-4317">[CALCITE-4317]
+   * RelFieldTrimmer after trimming all the fields in an aggregate
+   * should not return a zero field Aggregate</a>. */
+  @Test void testProjectJoinTransposeRuleOnAggWithNoFieldsWithTrimmer() {

Review comment:
       There were 2 parts to be tested here:
   1. Trimmer handles aggregate node if all the fields have been trimmed.
   2. Project-Join transpose rule handles the trimmed node properly.
   
   So i had to add the test in RelOptRulesTest for 2, for which i had to trim the node first, so it covers 1 as well. If you think i should add a separate test for 1 in RelFieldTrimmerTest, that can be done.




----------------------------------------------------------------
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:
users@infra.apache.org