vineetgarg02 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_r275067458
##########
File path: core/src/test/java/org/apache/calcite/test/RelMetadataTest.java
##########
@@ -678,6 +678,16 @@ private void checkRowCount(String sql, double expected,
double expectedMin,
checkRowCount(sql, 1D, 1D, 1D);
}
+ @Test public void testRowCountAggregateConstantKey() {
+ final String sql = "select count(*) from emp group by 1";
+ checkRowCount(sql, 1.4D, 0D, 1D);
+ }
+
+ @Test public void testRowCountAggregateConstantKeys() {
+ final String sql = "select count(*) from emp group by 1,4";
+ checkRowCount(sql, 1.4D, 0D, 1D);
+ }
Review comment:
@julianhyde @danny0405 I have updated the existing tests to use what
@julianhyde suggested
----------------------------------------------------------------
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