wojustme commented on a change in pull request #2542:
URL: https://github.com/apache/calcite/pull/2542#discussion_r716285628
##########
File path:
core/src/test/java/org/apache/calcite/test/MaterializedViewSubstitutionVisitorTest.java
##########
@@ -1041,6 +1041,77 @@
+ "where \"name\" = 'hello'";
sql(mv, query).ok();
}
+
+ @Test void testNoEqualFilterInAgg1() {
+ final String mv = ""
+ + "select \"name\", count(distinct \"deptno\") as cnt\n"
+ + "from \"emps\" group by \"name\"";
+ final String query = ""
+ + "select count(distinct \"deptno\") as cnt\n"
+ + "from \"emps\" where \"name\" <> 'hello'";
+ sql(mv, query).withChecker(
+ resultContains(""
+ + "LogicalCalc(expr#0..1=[{inputs}], expr#2=['hello':VARCHAR],
expr#3=[CAST($t0):VARCHAR], "
+ + "expr#4=[<>($t2, $t3)], CNT=[$t1], $condition=[$t4])\n"
+ + " EnumerableTableScan(table=[[hr, MV0]])")).ok();
+ }
Review comment:
Ok, it's really invalid.
I will close it, thanks for your review.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]