public void estimatorStats() {
        expressionContext.getOp().accept(this, expressionContext);
    }
@Test
    public void testLogicalOlapTableEmptyPartition(@Mocked CachedStatisticStorage cachedStatisticStorage) {
        ColumnRefOperator idDate = columnRefFactory.create("id_date", Type.DATE, true);
        GlobalStateMgr globalStateMgr = connectContext.getGlobalStateMgr();
        Table table = globalStateMgr.getDb("statistics_test").getTable("test_all_type");

        List<Partition> partitions = new ArrayList<>(((OlapTable) table).getPartitions());

        Partition partition1 = partitions.get(0);
        Partition partition2 = partitions.get(1);
        Partition partition3 = partitions.get(2);
        // mock one empty partition
        partition1.setVisibleVersion(Partition.PARTITION_INIT_VERSION, System.currentTimeMillis());
        partition2.setVisibleVersion(2, System.currentTimeMillis());
        partition3.setVisibleVersion(2, System.currentTimeMillis());
        List<Long> partitionIds = partitions.stream().filter(partition -> !(partition.getName().equalsIgnoreCase("p1"))).
                mapToLong(Partition::getId).boxed().collect(Collectors.toList());

        new Expectations() {
            {
                cachedStatisticStorage.getColumnStatistics(table, Lists.newArrayList("id_date"));
                result = new ColumnStatistic(0, Utils.getLongFromDateTime(LocalDateTime.of(2014, 12, 01, 0, 0, 0)),
                        0, 0, 30);
                minTimes = 0;

                cachedStatisticStorage.getColumnStatistic(table, "id_date");
                result = new ColumnStatistic(0, Utils.getLongFromDateTime(LocalDateTime.of(2014, 12, 01, 0, 0, 0)),
                        0, 0, 30);
                minTimes = 0;
            }
        };

        LogicalOlapScanOperator olapScanOperator =
                new LogicalOlapScanOperator(table,
                        ImmutableMap.of(idDate, new Column("id_date", Type.DATE, true)),
                        ImmutableMap.of(new Column("id_date", Type.DATE, true), idDate),
                        null, -1, null,
                        ((OlapTable) table).getBaseIndexId(),
                        partitionIds,
                        null,
                        false,
                        Lists.newArrayList(),
                        Lists.newArrayList(),
                        Lists.newArrayList(),
                        false);

        GroupExpression groupExpression = new GroupExpression(olapScanOperator, Lists.newArrayList());
        groupExpression.setGroup(new Group(0));
        ExpressionContext expressionContext = new ExpressionContext(groupExpression);
        StatisticsCalculator statisticsCalculator = new StatisticsCalculator(expressionContext,
                columnRefFactory, optimizerContext);
        statisticsCalculator.estimatorStats();
        ColumnStatistic columnStatistic = expressionContext.getStatistics().getColumnStatistic(idDate);
        Assert.assertEquals(30, columnStatistic.getDistinctValuesCount(), 0.001);

    }