@Override
  public double estimateRowCount(RelMetadataQuery mq) {
    BeamTableStatistics rowCountStatistics = calciteTable.getStatistic();
    if (beamTable.isBounded() == PCollection.IsBounded.BOUNDED) {
      return rowCountStatistics.getRowCount();
    } else {
      return rowCountStatistics.getRate();
    }
  }
@Test
  public void unboundedRowCount() {
    String sql = "SELECT * FROM ORDER_DETAILS_UNBOUNDED";

    RelNode root = env.parseQuery(sql);

    while (!(root instanceof BeamIOSourceRel)) {
      root = root.getInput(0);
    }

    Assert.assertEquals(2d, root.estimateRowCount(RelMetadataQuery.instance()), 0.001);
  }