asolimando commented on code in PR #3264:
URL: https://github.com/apache/calcite/pull/3264#discussion_r1229900002


##########
core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java:
##########
@@ -105,6 +105,44 @@ interface Handler extends MetadataHandler<UniqueKeys> {
     }
   }
 
+  /**
+   * Metadata about which columns have foreign keys.
+   */
+  public interface ForeignKeys extends Metadata {
+    MetadataDef<ForeignKeys> DEF =
+        MetadataDef.of(ForeignKeys.class, ForeignKeys.Handler.class,
+            BuiltInMethod.FOREIGN_KEYS.method);
+
+    /**
+     * Determines the list of foreign keys for this expression. Foreign keys 
are
+     * represented as an {@link org.apache.calcite.util.ImmutableBitSet}, where
+     * each bit position represents the column ordinal is foreign key.

Review Comment:
   I am not sure I understand this sentence, is it something like "where each 
bit position represents the column ordinal for the foreign key" what you mean 
or similar?
   
   I mean, I get that the bit position is encoding the ordinal position of each 
foreign key, but I am not sure about the wording.
   
   EDIT: by looking at the javadoc for uniquekey, we might also want to mention 
that indexing is "0-based" here too



-- 
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]

Reply via email to