PaulJackson123 commented on code in PR #3495:
URL: https://github.com/apache/calcite/pull/3495#discussion_r1408145985
##########
core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java:
##########
@@ -83,9 +83,9 @@ public interface UniqueKeys extends Metadata {
* represented as an {@link org.apache.calcite.util.ImmutableBitSet}, where
* each bit position represents a 0-based output column ordinal.
*
- * <p>Note that a key plus other columns is still unique. Therefore a table
- * with all columns unique has a unique key consisting of the empty set.
- * This is the case with all single-row tables.
+ * <p>Note that a unique key plus other columns is still unique.
+ * Conversely, all columns are unique in a table with a unique key
+ * consisting of the empty set, as is the case for all single-row tables.
Review Comment:
I changed the wording to accommodate the the zero-column case that you
mentioned - all zero-or-one-row tables have `()` as a key, but not all tables
that have all columns unique do.
However, I think it is true that all (even multi-row) tables with one or
more columns that have all columns unique have `()` as a unique key. So I might
be missing another point.
--
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]