public Double getPercentageOriginalRows(AggregateRelBase rel) { // REVIEW jvs 28-Mar-2006: The assumption here seems to be that // aggregation does not apply any filtering, so it does not modify the // percentage. That's very much oversimplified. return RelMetadataQuery.getPercentageOriginalRows(rel.getChild()); }
public Boolean areColumnsUnique(AggregateRelBase rel, BitSet columns, boolean ignoreNulls) { // group by keys form a unique key if (rel.getGroupCount() > 0) { BitSet groupKey = new BitSet(); for (int i = 0; i < rel.getGroupCount(); i++) { groupKey.set(i); } return BitSets.contains(columns, groupKey); } else { // interpret an empty set as asking whether the aggregation is full // table (in which case it returns at most one row); // TODO jvs 1-Sept-2008: apply this convention consistently // to other relational expressions, as well as to // RelMetadataQuery.getUniqueKeys return columns.isEmpty(); } }