You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Chunwei Lei (Jira)" <ji...@apache.org> on 2020/09/01 03:18:00 UTC
[jira] [Created] (CALCITE-4203) RelMdUniqueKeys should not return
empty when meeting Intersect and Minus if its input has unique keys
Chunwei Lei created CALCITE-4203:
------------------------------------
Summary: RelMdUniqueKeys should not return empty when meeting Intersect and Minus if its input has unique keys
Key: CALCITE-4203
URL: https://issues.apache.org/jira/browse/CALCITE-4203
Project: Calcite
Issue Type: Improvement
Reporter: Chunwei Lei
Assignee: Chunwei Lei
Currently, we get an empty unique key for Intersect and Minus if its all is true.
{code:java}
// code placeholder
public Set<ImmutableBitSet> getUniqueKeys(SetOp rel, RelMetadataQuery mq,
boolean ignoreNulls) {
if (!rel.all) {
return ImmutableSet.of(
ImmutableBitSet.range(rel.getRowType().getFieldCount()));
}
return ImmutableSet.of();
}
{code}
However, from the semantic of Intersect and Minus, we can get their unique keys from its input even if its all is true.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)