hsyuan commented on a change in pull request #1557: [CALCITE-3473] Getting
unique result for table scan should contain key column(s)
URL: https://github.com/apache/calcite/pull/1557#discussion_r352712973
##########
File path:
core/src/main/java/org/apache/calcite/rel/metadata/RelMdUniqueKeys.java
##########
@@ -226,6 +227,18 @@ private RelMdUniqueKeys() {}
return ImmutableSet.of();
}
+ public Set<ImmutableBitSet> getUniqueKeys(TableScan rel, RelMetadataQuery mq,
+ boolean ignoreNulls) {
+ final List<ImmutableBitSet> keys = rel.getTable().getKeys();
+ if (keys.isEmpty()) {
+ return null;
+ }
Review comment:
L233~L235 can be removed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services