LakeShen commented on code in PR #3345:
URL: https://github.com/apache/calcite/pull/3345#discussion_r1285772183


##########
testkit/src/main/java/org/apache/calcite/test/RelMetadataFixture.java:
##########
@@ -264,6 +265,18 @@ public RelMetadataFixture 
assertPercentageOriginalRows(Matcher<Double> matcher)
     return this;
   }
 
+  public RelMetadataFixture assertForeignKeys(Matcher<Set<RelOptForeignKey>> 
matcher,
+      Matcher<Set<RelOptForeignKey>> confirmedMatcher,
+      boolean ignoreNulls) {
+    RelNode rel = toRel();
+    RelMetadataQuery mq = rel.getCluster().getMetadataQuery();
+    Set<RelOptForeignKey> foreignKeys = mq.getForeignKeys(rel, ignoreNulls);

Review Comment:
   You could write more test cases, just like you have getForeignKeys method in 
RelMdForeignKeys for different relNodes



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to