hsyuan commented on a change in pull request #1155: [CALCITE-2991]
getMaxRowCount should return rowcount 1 for an aggrega…
URL: https://github.com/apache/calcite/pull/1155#discussion_r275068629
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/RelMdMaxRowCount.java
##########
@@ -129,6 +131,27 @@ public Double getMaxRowCount(Aggregate rel,
RelMetadataQuery mq) {
// Aggregate with no GROUP BY always returns 1 row (even on empty table).
return 1D;
}
+
+ // Aggregate with constant GROUP BY always reutrn 1 row
+ if (rel.getGroupType() == Aggregate.Group.SIMPLE) {
+ boolean isGroupbyKeysConstant = false;
Review comment:
The variable can be defined in L141.
----------------------------------------------------------------
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