@Override
public Double getDistinctRowCount(JoinRelBase rel, BitSet groupKey,
RexNode predicate) {
if (rel instanceof HiveJoinRel) {
HiveJoinRel hjRel = (HiveJoinRel) rel;
//TODO: Improve this
if (hjRel.isLeftSemiJoin()) {
return RelMetadataQuery.getDistinctRowCount(hjRel.getLeft(), groupKey,
rel.getCluster().getRexBuilder().makeLiteral(true));
} else {
return RelMdUtil.getJoinDistinctRowCount(rel, rel.getJoinType(),
groupKey, predicate, true);
}