atharvrastogi1411 commented on code in PR #5400:
URL: https://github.com/apache/calcite/pull/5400#discussion_r4523610730
##########
core/src/test/java/org/apache/calcite/test/RelMdPredicatesTest.java:
##########
@@ -35,11 +43,147 @@
import static org.apache.calcite.test.Matchers.sortsAs;
import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertTrue;
/** Tests for {@link org.apache.calcite.rel.metadata.RelMdPredicates} class. */
public class RelMdPredicatesTest {
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7916">[CALCITE-7916]
+ * RelMdPredicates should preserve input predicates through Window</a>. */
+ @Test void testPullUpConstantThroughWindow() {
+ final Window window = window("select *, row_number() over (order by empno)
as rn\n"
+ + "from emp where deptno = 10");
+ final RelMetadataQuery mq = window.getCluster().getMetadataQuery();
+ final RelOptPredicateList predicates = mq.getPulledUpPredicates(window);
Review Comment:
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]