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 2021/10/18 12:34:26 UTC

[GitHub] [calcite] wojustme opened a new pull request #2588: [CALCITE-4735] Enhance Aggregate-Materialization, Drilldown same grouping query with mv's agg-calls (xurenhe)

wojustme opened a new pull request #2588:
URL: https://github.com/apache/calcite/pull/2588


   Enhance Aggregate-Materialization, fix issue: [CALCITE-4857](https://issues.apache.org/jira/browse/CALCITE-4857)


-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #2588: [CALCITE-4857] Enhance Aggregate-Materialization, when building query's grouping with mv's agg-calls (xurenhe)

Posted by GitBox <gi...@apache.org>.
yanlin-Lynn commented on a change in pull request #2588:
URL: https://github.com/apache/calcite/pull/2588#discussion_r731453422



##########
File path: core/src/test/java/org/apache/calcite/test/MaterializedViewSubstitutionVisitorTest.java
##########
@@ -1214,6 +1214,74 @@
     sql(mv, query).ok();
   }
 
+  /**
+   * It's match, when roll up query's grouping with mv's agg-call.
+   */
+  @Test void testRollupWithGroupingAggCall1() {
+    final String mv = ""
+        + "select \"deptno\", \"salary\", min(\"commission\")"
+        + "from \"emps\" group by \"deptno\", \"salary\"";
+    final String query = ""
+        + "select \"deptno\", max(\"salary\"), min(\"commission\"), \"salary\""
+        + "from \"emps\" group by \"deptno\", \"salary\"";

Review comment:
       As commented in jira, how about simplify the query?




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [calcite] wojustme commented on a change in pull request #2588: [CALCITE-4857] Enhance Aggregate-Materialization, when building query's grouping with mv's agg-calls (xurenhe)

Posted by GitBox <gi...@apache.org>.
wojustme commented on a change in pull request #2588:
URL: https://github.com/apache/calcite/pull/2588#discussion_r731865436



##########
File path: core/src/test/java/org/apache/calcite/test/MaterializedViewSubstitutionVisitorTest.java
##########
@@ -1214,6 +1214,74 @@
     sql(mv, query).ok();
   }
 
+  /**
+   * It's match, when roll up query's grouping with mv's agg-call.
+   */
+  @Test void testRollupWithGroupingAggCall1() {
+    final String mv = ""
+        + "select \"deptno\", \"salary\", min(\"commission\")"
+        + "from \"emps\" group by \"deptno\", \"salary\"";
+    final String query = ""
+        + "select \"deptno\", max(\"salary\"), min(\"commission\"), \"salary\""
+        + "from \"emps\" group by \"deptno\", \"salary\"";

Review comment:
       Ok, Let's discuss in the jira: [CALCITE-4857](https://issues.apache.org/jira/browse/CALCITE-4857)
   
   ---
   
   Hi, @hsyuan @xy2953396112 @xiayutianwei1994
   Do you have time? Please put forward your views in jira.
   
   Thanks a lot.




-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org