asolimando commented on code in PR #3264:
URL: https://github.com/apache/calcite/pull/3264#discussion_r1229989016
##########
core/src/main/java/org/apache/calcite/rel/rules/ProjectJoinRemoveRule.java:
##########
@@ -127,6 +151,49 @@ public ProjectJoinRemoveRule(
call.transformTo(node);
}
+ /**
+ * Check as following:
+ * 1. Make sure that every foreign column always be foreign key.
+ * 2. The target of foreign key is the correct unique key correspondingly.
+ */
+ private static boolean areForeignKeysValid(List<Integer> foreignColumns,
+ List<Integer> uniqueColumns,
+ ImmutableBitSet foreignKeys,
+ RelMetadataQuery mq,
+ RelNode foreignSideRel,
+ RelNode uniqueSideRel) {
Review Comment:
As long as stylecheck passes I am OK, but I have rarely seen in Calcite
formatting each parameter on a newline like that, I think the following could
also work:
```suggestion
private static boolean areForeignKeysValid(List<Integer> foreignColumns,
List<Integer> uniqueColumns, ImmutableBitSet foreignKeys,
RelMetadataQuery mq,
RelNode foreignSideRel, RelNode uniqueSideRel) {
```
Not necessary to change if nobody else complains and you like this style.
--
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]