public TableStats merge(TableStats other, @Nullable Set<String> partitionKeys) {
        if (this.rowCount < 0 || other.rowCount < 0) {
            return TableStats.UNKNOWN;
        }
        long rowCount =
                this.rowCount >= 0 && other.rowCount >= 0
                        ? this.rowCount + other.rowCount
                        : UNKNOWN.rowCount;
        return new TableStats(rowCount, mergeColumnStates(other, partitionKeys));
    }
@Test
    void testMergeColumnStatsUnknown() {
        ColumnStats columnStats0 = new ColumnStats(4L, 5L, 2D, 3, 15, 2);
        ColumnStats columnStats1 = new ColumnStats(4L, null, 2D, 3, 15, 2);
        ColumnStats columnStats2 = new ColumnStats(4L, 5L, 2D, null, 15, 2);
        ColumnStats columnStats3 = new ColumnStats(null, 5L, 2D, 3, 15, 2);
        ColumnStats columnStats4 = new ColumnStats(4L, 5L, 2D, 3, null, 2);
        ColumnStats columnStats5 = new ColumnStats(4L, 5L, 2D, 3, 15, null);
        ColumnStats columnStats6 = new ColumnStats(4L, 5L, null, 3, 15, 2);

        assertThat(columnStats0.merge(columnStats1, false))
                .isEqualTo(new ColumnStats(4L, null, 2D, 3, 15, 2));
        assertThat(columnStats0.merge(columnStats2, false))
                .isEqualTo(new ColumnStats(4L, 10L, 2D, null, 15, 2));
        assertThat(columnStats0.merge(columnStats3, false))
                .isEqualTo(new ColumnStats(null, 10L, 2D, 3, 15, 2));
        assertThat(columnStats0.merge(columnStats4, false))
                .isEqualTo(new ColumnStats(4L, 10L, 2D, 3, null, 2));
        assertThat(columnStats0.merge(columnStats5, false))
                .isEqualTo(new ColumnStats(4L, 10L, 2D, 3, 15, null));
        assertThat(columnStats0.merge(columnStats6, false))
                .isEqualTo(new ColumnStats(4L, 10L, null, 3, 15, 2));
        assertThat(columnStats6.merge(columnStats6, false))
                .isEqualTo(new ColumnStats(4L, 10L, null, 3, 15, 2));

        // tet column stats merge while partition key is true.
        assertThat(columnStats0.merge(columnStats1, true))
                .isEqualTo(new ColumnStats(8L, null, 2D, 3, 15, 2));
        assertThat(columnStats0.merge(columnStats3, true))
                .isEqualTo(new ColumnStats(null, 10L, 2D, 3, 15, 2));
    }