xiedeyantu commented on code in PR #4778:
URL: https://github.com/apache/calcite/pull/4778#discussion_r2737393314
##########
core/src/test/java/org/apache/calcite/test/enumerable/EnumerableCorrelateTest.java:
##########
@@ -296,6 +304,170 @@ class EnumerableCorrelateTest {
.returnsUnordered("empid=200; name=Eric");
}
+ private static Program getConditionalCorrelateProgram() {
+ Program subQuery =
+ Programs.hep(
+ ImmutableList.of(CoreRules.PROJECT_SUB_QUERY_TO_MARK_CORRELATE,
+ CoreRules.FILTER_SUB_QUERY_TO_MARK_CORRELATE),
+ true,
+ DefaultRelMetadataProvider.INSTANCE);
+ Program toCalc =
+ Programs.hep(
+ ImmutableList.of(
+ CoreRules.PROJECT_TO_CALC,
+ CoreRules.FILTER_TO_CALC,
+ CoreRules.CALC_MERGE),
+ true,
+ DefaultRelMetadataProvider.INSTANCE);
+
+ final List<RelOptRule> enumerableRules =
+ ImmutableList.of(
+ EnumerableRules.ENUMERABLE_VALUES_RULE,
+ EnumerableRules.ENUMERABLE_CALC_RULE,
+ EnumerableRules.ENUMERABLE_UNCOLLECT_RULE,
+ EnumerableRules.ENUMERABLE_CONDITIONAL_CORRELATE_RULE);
+ Program enumerableImpl = Programs.ofRules(enumerableRules);
+ return Programs.sequence(subQuery, toCalc, enumerableImpl);
+ }
+
+ /** Test case for
+ * <a
href="https://issues.apache.org/jira/browse/CALCITE-7403";>[CALCITE-7403]
+ * Missing ENUMERABLE Convention for LogicalConditionalCorrelate</a>. */
+ @Test void testConditionalCorrelateForExists() {
Review Comment:
This is the comparison with PostgreSQL, link
[here](https://onecompiler.com/postgresql/44bxfxary).
--
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]