public Double getDistinctRowCount(Filter rel, RelMetadataQuery mq, ImmutableBitSet groupKey, RexNode predicate) { if (predicate == null || predicate.isAlwaysTrue()) { if (groupKey.isEmpty()) { return 1D; } } // REVIEW zfong 4/18/06 - In the Broadbase code, duplicates are not // removed from the two filter lists. However, the code below is // doing so. RexNode unionPreds = RelMdUtil.unionPreds( rel.getCluster().getRexBuilder(), predicate, rel.getCondition()); return mq.getDistinctRowCount(rel.getInput(), groupKey, unionPreds); }
public Double getDistinctRowCount(Filter rel, RelMetadataQuery mq, ImmutableBitSet groupKey, RexNode predicate) { if (predicate == null || predicate.isAlwaysTrue()) { if (groupKey.isEmpty()) { return 1D; } } // REVIEW zfong 4/18/06 - In the Broadbase code, duplicates are not // removed from the two filter lists. However, the code below is // doing so. RexNode unionPreds = RelMdUtil.unionPreds( rel.getCluster().getRexBuilder(), predicate, rel.getCondition()); return mq.getDistinctRowCount(rel.getInput(), groupKey, unionPreds); }